b2b-platform-utils 1.1.57 → 1.1.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/errorsMap.js +48 -0
- package/package.json +1 -1
package/errorsMap.js
CHANGED
|
@@ -880,6 +880,54 @@ const STATIC_ERRORS = [
|
|
|
880
880
|
httpCode: 503,
|
|
881
881
|
description: "Service is temporarily unavailable.",
|
|
882
882
|
},
|
|
883
|
+
{
|
|
884
|
+
errorCode: 1144,
|
|
885
|
+
errorKey: "promocodeInvalid",
|
|
886
|
+
httpCode: 422,
|
|
887
|
+
description: "Promo code is invalid or cannot be applied.",
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
errorCode: 1145,
|
|
891
|
+
errorKey: "promocodeExpired",
|
|
892
|
+
httpCode: 422,
|
|
893
|
+
description: "Promo code is expired.",
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
errorCode: 1146,
|
|
897
|
+
errorKey: "promocodeUsageLimitReached",
|
|
898
|
+
httpCode: 422,
|
|
899
|
+
description: "Promo code usage limit has been reached.",
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
errorCode: 1147,
|
|
903
|
+
errorKey: "promocodeApplicationModeMismatch",
|
|
904
|
+
httpCode: 422,
|
|
905
|
+
description: "Promo code application mode does not match the requested operation.",
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
errorCode: 1148,
|
|
909
|
+
errorKey: "promocodeTargetBonusAlreadyOwned",
|
|
910
|
+
httpCode: 422,
|
|
911
|
+
description: "Target bonus is already owned by the user.",
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
errorCode: 1149,
|
|
915
|
+
errorKey: "promocodeTargetBonusUnavailable",
|
|
916
|
+
httpCode: 422,
|
|
917
|
+
description: "Target bonus is not available for this promo code.",
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
errorCode: 1150,
|
|
921
|
+
errorKey: "promocodeAlreadyApplied",
|
|
922
|
+
httpCode: 422,
|
|
923
|
+
description: "Promo code has already been applied.",
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
errorCode: 1151,
|
|
927
|
+
errorKey: "promocodeNotActive",
|
|
928
|
+
httpCode: 422,
|
|
929
|
+
description: "Promo code is not active.",
|
|
930
|
+
},
|
|
883
931
|
];
|
|
884
932
|
|
|
885
933
|
const STATIC_BY_KEY = Object.fromEntries(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "b2b-platform-utils",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.58",
|
|
4
4
|
"description": "Shared utilities for Node.js microservices: errors map, local cache, logger, numbers, dates, filesystem, media optimization, paginator, slugger, crypto wrapper, sanitize HTML, sorting.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"license": "KingSizer",
|