b2b-platform-utils 1.1.36 → 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 +102 -0
- package/package.json +1 -1
package/errorsMap.js
CHANGED
|
@@ -443,6 +443,108 @@ const STATIC_ERRORS = [
|
|
|
443
443
|
httpCode: 403,
|
|
444
444
|
description: "Registration is not allowed.",
|
|
445
445
|
},
|
|
446
|
+
{
|
|
447
|
+
errorCode: 1072,
|
|
448
|
+
errorKey: "paymentCompletedInvalidUser",
|
|
449
|
+
httpCode: 422,
|
|
450
|
+
description: "User reference is missing or invalid for payment.completed.",
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
errorCode: 1073,
|
|
454
|
+
errorKey: "paymentCompletedMissingIdempotencyKey",
|
|
455
|
+
httpCode: 422,
|
|
456
|
+
description: "Idempotency key is missing for payment.completed.",
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
errorCode: 1074,
|
|
460
|
+
errorKey: "paymentCompletedInvalidCurrency",
|
|
461
|
+
httpCode: 422,
|
|
462
|
+
description: "Currency is missing or invalid for payment.completed.",
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
errorCode: 1075,
|
|
466
|
+
errorKey: "paymentCompletedInvalidAmount",
|
|
467
|
+
httpCode: 422,
|
|
468
|
+
description: "Amount is missing or invalid for payment.completed.",
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
errorCode: 1076,
|
|
472
|
+
errorKey: "paymentCompletedInvalidCurrencyScale",
|
|
473
|
+
httpCode: 422,
|
|
474
|
+
description: "Currency scale is missing or invalid for payment.completed.",
|
|
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
|
+
},
|
|
446
548
|
];
|
|
447
549
|
|
|
448
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",
|