chore: fix promotion not found error text (#7200)

This commit is contained in:
Riqwan Thamir authored and GitHub committed 2024-05-02 08:46:10 +02:00
1 parent b6083ce104
commit ea1d926dfa
1 file changed
+7 -5
@@ -2,18 +2,20 @@ import {
deletePromotionsWorkflow, deletePromotionsWorkflow,
updatePromotionsWorkflow, updatePromotionsWorkflow,
} from "@medusajs/core-flows" } from "@medusajs/core-flows"
import { MedusaError } from "@medusajs/utils" import {
ContainerRegistrationKeys,
MedusaError,
remoteQueryObjectFromString,
} from "@medusajs/utils"
import { import {
AuthenticatedMedusaRequest, AuthenticatedMedusaRequest,
MedusaResponse, MedusaResponse,
} from "../../../../types/routing" } from "../../../../types/routing"
import { refetchPromotion } from "../helpers"
import { import {
AdminGetPromotionParamsType, AdminGetPromotionParamsType,
AdminUpdatePromotionType, AdminUpdatePromotionType,
} from "../validators" } from "../validators"
import { ContainerRegistrationKeys } from "@medusajs/utils"
import { remoteQueryObjectFromString } from "@medusajs/utils"
import { refetchPromotion } from "../helpers"
export const GET = async ( export const GET = async (
req: AuthenticatedMedusaRequest<AdminGetPromotionParamsType>, req: AuthenticatedMedusaRequest<AdminGetPromotionParamsType>,
@@ -33,7 +35,7 @@ export const GET = async (
if (!promotion) { if (!promotion) {
throw new MedusaError( throw new MedusaError(
MedusaError.Types.NOT_FOUND, MedusaError.Types.NOT_FOUND,
`Promotion with id or code: does-not-exist was not found` `Promotion with id or code: ${idOrCode} was not found`
) )
} }