chore: Expose Awilix resolution errors (#13008)
Co-authored-by: Trevor N. <trevor@pegasuscart.com> Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
co-authored by
Trevor N.
Oli Juhl
parent
44ee9a06ba
commit
74f86c95b1
@@ -35,6 +35,10 @@ export default class AuthProviderService {
|
|||||||
const errMessage = `
|
const errMessage = `
|
||||||
Unable to retrieve the auth provider with id: ${providerId}
|
Unable to retrieve the auth provider with id: ${providerId}
|
||||||
Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.`
|
Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.`
|
||||||
|
|
||||||
|
// Log full error for debugging
|
||||||
|
this.#logger.error(`AwilixResolutionError: ${err.message}`, err)
|
||||||
|
|
||||||
throw new Error(errMessage)
|
throw new Error(errMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,6 +66,10 @@ export default class FulfillmentProviderService extends ModulesSdkUtils.MedusaIn
|
|||||||
const errMessage = `
|
const errMessage = `
|
||||||
Unable to retrieve the fulfillment provider with id: ${providerId}
|
Unable to retrieve the fulfillment provider with id: ${providerId}
|
||||||
Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.`
|
Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.`
|
||||||
|
|
||||||
|
// Log full error for debugging
|
||||||
|
this.#logger.error(`AwilixResolutionError: ${err.message}`, err)
|
||||||
|
|
||||||
throw new Error(errMessage)
|
throw new Error(errMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ export default class LockingProviderService {
|
|||||||
const errMessage = `
|
const errMessage = `
|
||||||
Unable to retrieve the locking provider with id: ${providerId}
|
Unable to retrieve the locking provider with id: ${providerId}
|
||||||
Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.`
|
Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.`
|
||||||
|
|
||||||
|
// Log full error for debugging
|
||||||
|
this.#logger.error(`AwilixResolutionError: ${err.message}`, err)
|
||||||
|
|
||||||
throw new Error(errMessage)
|
throw new Error(errMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ export default class NotificationProviderService extends ModulesSdkUtils.MedusaI
|
|||||||
const errMessage = `
|
const errMessage = `
|
||||||
Unable to retrieve the notification provider with id: ${providerId}
|
Unable to retrieve the notification provider with id: ${providerId}
|
||||||
Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.`
|
Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.`
|
||||||
|
|
||||||
|
// Log full error for debugging
|
||||||
|
this.#logger.error(`AwilixResolutionError: ${err.message}`, err)
|
||||||
|
|
||||||
throw new Error(errMessage)
|
throw new Error(errMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,10 @@ export default class PaymentProviderService extends ModulesSdkUtils.MedusaIntern
|
|||||||
const errMessage = `
|
const errMessage = `
|
||||||
Unable to retrieve the payment provider with id: ${providerId}
|
Unable to retrieve the payment provider with id: ${providerId}
|
||||||
Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.`
|
Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.`
|
||||||
|
|
||||||
|
// Log full error for debugging
|
||||||
|
this.#logger.error(`AwilixResolutionError: ${err.message}`, err)
|
||||||
|
|
||||||
throw new Error(errMessage)
|
throw new Error(errMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ export default class TaxProviderService extends ModulesSdkUtils.MedusaInternalSe
|
|||||||
const errMessage = `
|
const errMessage = `
|
||||||
Unable to retrieve the tax provider with id: ${providerId}
|
Unable to retrieve the tax provider with id: ${providerId}
|
||||||
Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.`
|
Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.`
|
||||||
|
|
||||||
|
// Log full error for debugging
|
||||||
|
this.#logger.error(`AwilixResolutionError: ${err.message}`, err)
|
||||||
|
|
||||||
throw new Error(errMessage)
|
throw new Error(errMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user