@springworks/error-factory
Advanced tools
Comparing version 3005.258.0 to 3005.272.0
@@ -30,3 +30,9 @@ "use strict"; | ||
Object.defineProperties(error, { | ||
toJSON: { value: internals_1.getOutputPayload, enumerable: true }, | ||
toJSON: { | ||
value: () => ({ | ||
...error.output.payload, // old goodies like root_error_id, error_id and statusCode | ||
...(params ? pickHumanFriendlyInput(params) : undefined), | ||
}), | ||
enumerable: true, | ||
}, | ||
payload: (0, internals_1.createLogPayloadDescriptor)(), | ||
@@ -37,2 +43,9 @@ }); | ||
exports.createError = createError; | ||
function pickHumanFriendlyInput(params) { | ||
return { | ||
...(params.message ? { message: params.message } : undefined), | ||
...(params.cause ? { cause: params.cause } : undefined), | ||
...(params.code ? { code: params.code } : undefined), | ||
}; | ||
} | ||
//# sourceMappingURL=main.js.map |
{ | ||
"name": "@springworks/error-factory", | ||
"version": "3005.258.0", | ||
"version": "3005.272.0", | ||
"description": "Custom error that makes use of HTTP error codes to identify different error types.", | ||
@@ -28,3 +28,3 @@ "main": "build/main.js", | ||
"homepage": "https://github.com/Springworks/m2h-mono/tree/master/packages/error-factory#readme", | ||
"gitHead": "b3b8e1753e7320b014b3b19d4948c08f2e51523a" | ||
"gitHead": "cc26789472086dd03cc094fa11be605a429f802a" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
35217
312