@medusajs/utils 1.11.10 → 1.11.11
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/dist/common/errors.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare const MedusaErrorCodes: {
|
|
|
24
24
|
* @extends Error
|
|
25
25
|
*/
|
|
26
26
|
export declare class MedusaError extends Error {
|
|
27
|
+
__isMedusaError: boolean;
|
|
27
28
|
type: string;
|
|
28
29
|
message: string;
|
|
29
30
|
code?: string;
|
|
@@ -53,5 +54,9 @@ export declare class MedusaError extends Error {
|
|
|
53
54
|
* @param {Array} params - params
|
|
54
55
|
*/
|
|
55
56
|
constructor(type: string, message: string, code?: string, ...params: any);
|
|
57
|
+
/**
|
|
58
|
+
* Checks the object for the MedusaError type.
|
|
59
|
+
*/
|
|
60
|
+
static isMedusaError(error: any): error is MedusaError;
|
|
56
61
|
}
|
|
57
62
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/common/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,gBAAgB;IAC3B,wCAAwC;;;;;;;;;;;CAWzC,CAAA;AAED,eAAO,MAAM,gBAAgB;;;CAG5B,CAAA;AAED;;;GAGG;AACH,qBAAa,WAAY,SAAQ,KAAK;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/common/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,gBAAgB;IAC3B,wCAAwC;;;;;;;;;;;CAWzC,CAAA;AAED,eAAO,MAAM,gBAAgB;;;CAG5B,CAAA;AAED;;;GAGG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC,eAAe,UAAO;IAEf,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,IAAI,CAAA;IACjB,OAAc,KAAK;QA7BnB,wCAAwC;;;;;;;;;;;MA6BF;IACtC,OAAc,KAAK;;;MAAmB;IAEtC;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG;IAaxE;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,WAAW;CAGvD"}
|
package/dist/common/errors.js
CHANGED
|
@@ -81,6 +81,7 @@ var MedusaError = /** @class */ (function (_super) {
|
|
|
81
81
|
params[_i - 3] = arguments[_i];
|
|
82
82
|
}
|
|
83
83
|
var _this = _super.apply(this, __spreadArray([], __read(params), false)) || this;
|
|
84
|
+
_this.__isMedusaError = true;
|
|
84
85
|
if (Error.captureStackTrace) {
|
|
85
86
|
Error.captureStackTrace(_this, MedusaError);
|
|
86
87
|
}
|
|
@@ -90,6 +91,12 @@ var MedusaError = /** @class */ (function (_super) {
|
|
|
90
91
|
_this.date = new Date();
|
|
91
92
|
return _this;
|
|
92
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Checks the object for the MedusaError type.
|
|
96
|
+
*/
|
|
97
|
+
MedusaError.isMedusaError = function (error) {
|
|
98
|
+
return !!error.__isMedusaError;
|
|
99
|
+
};
|
|
93
100
|
MedusaError.Types = exports.MedusaErrorTypes;
|
|
94
101
|
MedusaError.Codes = exports.MedusaErrorCodes;
|
|
95
102
|
return MedusaError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/common/errors.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;GAGG;AACU,QAAA,gBAAgB,GAAG;IAC9B,wCAAwC;IACxC,QAAQ,EAAE,gBAAgB;IAC1B,eAAe,EAAE,iBAAiB;IAClC,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