@feathersjs/errors
Advanced tools
Comparing version 5.0.0-pre.30 to 5.0.0-pre.31
@@ -6,2 +6,8 @@ # Change Log | ||
# [5.0.0-pre.31](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.30...v5.0.0-pre.31) (2022-10-12) | ||
### Bug Fixes | ||
- **errors:** Allows to pass no error message ([#2794](https://github.com/feathersjs/feathers/issues/2794)) ([f3ddab6](https://github.com/feathersjs/feathers/commit/f3ddab637e269e67e852ffce07b060bab2b085c0)) | ||
# [5.0.0-pre.30](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.29...v5.0.0-pre.30) (2022-10-07) | ||
@@ -8,0 +14,0 @@ |
@@ -12,3 +12,3 @@ export interface FeathersErrorJSON { | ||
}; | ||
export declare type ErrorMessage = string | DynamicError | { | ||
export declare type ErrorMessage = null | string | DynamicError | { | ||
[key: string]: any; | ||
@@ -15,0 +15,0 @@ } | any[]; |
@@ -17,3 +17,3 @@ "use strict"; | ||
else if (typeof err === 'object' || _data !== undefined) { | ||
const { message, errors, ...rest } = typeof err === 'object' ? err : _data; | ||
const { message, errors, ...rest } = err !== null && typeof err === 'object' ? err : _data; | ||
msg = message || msg; | ||
@@ -20,0 +20,0 @@ properties.errors = errors; |
{ | ||
"name": "@feathersjs/errors", | ||
"description": "Common error types for Feathers apps", | ||
"version": "5.0.0-pre.30", | ||
"version": "5.0.0-pre.31", | ||
"homepage": "https://feathersjs.com", | ||
@@ -52,3 +52,3 @@ "main": "lib/", | ||
"devDependencies": { | ||
"@feathersjs/feathers": "^5.0.0-pre.30", | ||
"@feathersjs/feathers": "^5.0.0-pre.31", | ||
"@types/mocha": "^10.0.0", | ||
@@ -61,3 +61,3 @@ "@types/node": "^18.8.2", | ||
}, | ||
"gitHead": "b535c91197f4b997520e0a0e608793eeba791931" | ||
"gitHead": "4500dbeb8cea566678cf88b3313a88efd93a2ed9" | ||
} |
@@ -11,3 +11,3 @@ export interface FeathersErrorJSON { | ||
export type DynamicError = Error & { [key: string]: any } | ||
export type ErrorMessage = string | DynamicError | { [key: string]: any } | any[] | ||
export type ErrorMessage = null | string | DynamicError | { [key: string]: any } | any[] | ||
@@ -37,3 +37,3 @@ interface ErrorProperties extends Omit<FeathersErrorJSON, 'message'> { | ||
} else if (typeof err === 'object' || _data !== undefined) { | ||
const { message, errors, ...rest } = typeof err === 'object' ? err : _data | ||
const { message, errors, ...rest } = err !== null && typeof err === 'object' ? err : _data | ||
@@ -40,0 +40,0 @@ msg = message || msg |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62957