diff --git a/libs/reviews/driver/magento/src/errors/codes.ts b/libs/reviews/driver/magento/src/errors/codes.ts deleted file mode 100644 index b79ee8de74..0000000000 --- a/libs/reviews/driver/magento/src/errors/codes.ts +++ /dev/null @@ -1,3 +0,0 @@ -export enum MagentoGeographyGraphQlErrorCode { - COUNTRY_NOT_FOUND = 'graphql-no-such-entity', -} diff --git a/libs/reviews/driver/magento/src/errors/map.ts b/libs/reviews/driver/magento/src/errors/map.ts index c52299f1ec..4e931f7368 100644 --- a/libs/reviews/driver/magento/src/errors/map.ts +++ b/libs/reviews/driver/magento/src/errors/map.ts @@ -1,8 +1,3 @@ import { DaffErrorCodeMap } from '@daffodil/core'; -import { DaffProductReviewsNotFoundError } from '@daffodil/reviews/driver'; -import { MagentoGeographyGraphQlErrorCode } from './codes'; - -export const DaffReviewsMagentoErrorMap: DaffErrorCodeMap = { - [MagentoGeographyGraphQlErrorCode.COUNTRY_NOT_FOUND]: DaffProductReviewsNotFoundError, -}; +export const DaffReviewsMagentoErrorMap: DaffErrorCodeMap = {}; diff --git a/libs/reviews/driver/magento/src/errors/public_api.ts b/libs/reviews/driver/magento/src/errors/public_api.ts index 0c2ba36ae2..67d642cb9b 100644 --- a/libs/reviews/driver/magento/src/errors/public_api.ts +++ b/libs/reviews/driver/magento/src/errors/public_api.ts @@ -1,3 +1,2 @@ -export { MagentoGeographyGraphQlErrorCode } from './codes'; export { DaffReviewsMagentoErrorMap } from './map'; export { transformMagentoReviewsError } from './transform'; diff --git a/libs/reviews/driver/magento/src/errors/transform.ts b/libs/reviews/driver/magento/src/errors/transform.ts index db7f518e6f..1c5b335038 100644 --- a/libs/reviews/driver/magento/src/errors/transform.ts +++ b/libs/reviews/driver/magento/src/errors/transform.ts @@ -2,6 +2,6 @@ import { daffTransformMagentoError } from '@daffodil/driver/magento'; import { DaffReviewsMagentoErrorMap } from './map'; -export function transformMagentoReviewsError(error: any) { +export const transformMagentoReviewsError = (error: any) => { return daffTransformMagentoError(error, DaffReviewsMagentoErrorMap); }