@jd-data-limited/easy-fm 0.0.9 → 0.0.10
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/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -489,7 +489,7 @@ class find {
|
|
|
489
489
|
}
|
|
490
490
|
export class FMError extends Error {
|
|
491
491
|
constructor(code, httpStatus, res) {
|
|
492
|
-
super(errs.find(err => err.e ===
|
|
492
|
+
super(errs.find(err => err.e === code) || "Unknown error");
|
|
493
493
|
this.httpStatus = httpStatus;
|
|
494
494
|
this.res = res;
|
|
495
495
|
this.code = typeof code === "string" ? parseInt(code) : code;
|
package/index.ts
CHANGED
|
@@ -570,7 +570,7 @@ export class FMError extends Error {
|
|
|
570
570
|
readonly message: string
|
|
571
571
|
|
|
572
572
|
constructor(code, httpStatus, res) {
|
|
573
|
-
super(errs.find(err => err.e ===
|
|
573
|
+
super(errs.find(err => err.e === code) || "Unknown error");
|
|
574
574
|
this.httpStatus = httpStatus
|
|
575
575
|
this.res = res
|
|
576
576
|
this.code = typeof code === "string" ? parseInt(code) : code
|