diff --git a/packages/core/src/i18n/messages/en.json b/packages/core/src/i18n/messages/en.json index 49a9d2eab5..f87f7c4225 100644 --- a/packages/core/src/i18n/messages/en.json +++ b/packages/core/src/i18n/messages/en.json @@ -26,6 +26,7 @@ "forbidden": "You are not currently authorized to perform this action", "invalid-sort-field": "The sort field '{ fieldName }' is invalid. Valid fields are: { validFields }", "no-active-tax-zone": "The active tax zone could not be determined. Ensure a default tax zone is set for the current channel.", + "no-price-found-for-channel": "No price information was found for ProductVariant ID '{ variantId}' in the Channel '{ channel }'.", "no-search-plugin-configured": "No search plugin has been configured", "order-does-not-contain-line-with-id": "This order does not contain an OrderLine with the id { id }", "pending-identifier-missing": "Could not find the pending email address to update", diff --git a/packages/core/src/service/services/product-variant.service.ts b/packages/core/src/service/services/product-variant.service.ts index fb8112e0a6..f143bb9cca 100644 --- a/packages/core/src/service/services/product-variant.service.ts +++ b/packages/core/src/service/services/product-variant.service.ts @@ -434,7 +434,10 @@ export class ProductVariantService { applyChannelPriceAndTax(variant: ProductVariant, ctx: RequestContext): ProductVariant { const channelPrice = variant.productVariantPrices.find(p => idsAreEqual(p.channelId, ctx.channelId)); if (!channelPrice) { - throw new InternalServerError(`error.no-price-found-for-channel`); + throw new InternalServerError(`error.no-price-found-for-channel`, { + variantId: variant.id, + channel: ctx.channel.code, + }); } const { taxZoneStrategy } = this.configService.taxOptions; const zones = this.zoneService.findAll(ctx);