b2b-platform-utils 1.1.37 → 1.1.39
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 +72 -0
- package/package.json +1 -1
package/errorsMap.js
CHANGED
|
@@ -473,6 +473,78 @@ const STATIC_ERRORS = [
|
|
|
473
473
|
httpCode: 422,
|
|
474
474
|
description: "Currency scale is missing or invalid for payment.completed.",
|
|
475
475
|
},
|
|
476
|
+
{
|
|
477
|
+
errorCode: 1077,
|
|
478
|
+
errorKey: "userBalanceInvalidUser",
|
|
479
|
+
httpCode: 422,
|
|
480
|
+
description: "User identifier is missing or invalid for balance mutation.",
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
errorCode: 1078,
|
|
484
|
+
errorKey: "userBalanceInvalidCurrency",
|
|
485
|
+
httpCode: 422,
|
|
486
|
+
description: "Currency is missing or invalid for balance mutation.",
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
errorCode: 1079,
|
|
490
|
+
errorKey: "userBalanceInvalidDeltaMinor",
|
|
491
|
+
httpCode: 422,
|
|
492
|
+
description: "Delta amount in minor units is missing or invalid for balance mutation.",
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
errorCode: 1080,
|
|
496
|
+
errorKey: "userBalanceInvalidType",
|
|
497
|
+
httpCode: 422,
|
|
498
|
+
description: 'Balance type is missing or invalid for mutation (expected "real" or "bonus").',
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
errorCode: 1081,
|
|
502
|
+
errorKey: "userBalanceInvalidSetAmountMinor",
|
|
503
|
+
httpCode: 422,
|
|
504
|
+
description: "Target balance amount in minor units is missing or invalid for absolute set operation.",
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
errorCode: 1082,
|
|
508
|
+
errorKey: "userBalanceInvalidOperation",
|
|
509
|
+
httpCode: 422,
|
|
510
|
+
description: "Balance operation type is missing or invalid for mutation.",
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
errorCode: 1083,
|
|
514
|
+
errorKey: "userBalanceInsufficientFunds",
|
|
515
|
+
httpCode: 422,
|
|
516
|
+
description: "Insufficient funds in target balance bucket for requested mutation.",
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
errorCode: 1084,
|
|
520
|
+
errorKey: "userBalanceNotFound",
|
|
521
|
+
httpCode: 404,
|
|
522
|
+
description: "User balance row was not found for requested currency and type.",
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
errorCode: 1085,
|
|
526
|
+
errorKey: "userBalanceInvalidTransferAmountMinor",
|
|
527
|
+
httpCode: 422,
|
|
528
|
+
description: "Transfer amount in minor units is missing or invalid.",
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
errorCode: 1086,
|
|
532
|
+
errorKey: "userBalanceInvalidTransferTarget",
|
|
533
|
+
httpCode: 422,
|
|
534
|
+
description: "Balance transfer target bucket is missing or invalid.",
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
errorCode: 1087,
|
|
538
|
+
errorKey: "userBalanceInvalidResetTarget",
|
|
539
|
+
httpCode: 422,
|
|
540
|
+
description: "Balance reset target bucket is missing or invalid.",
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
errorCode: 1088,
|
|
544
|
+
errorKey: "userBalanceInvalidSetTarget",
|
|
545
|
+
httpCode: 422,
|
|
546
|
+
description: "Balance set target bucket is missing or invalid.",
|
|
547
|
+
},
|
|
476
548
|
];
|
|
477
549
|
|
|
478
550
|
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.39",
|
|
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",
|