@naturalcycles/js-lib
Advanced tools
Comparing version 4.10.1 to 4.10.2
@@ -0,1 +1,8 @@ | ||
## [4.10.2](https://github.com/NaturalCycles/js-lib/compare/v4.10.1...v4.10.2) (2019-05-08) | ||
### Bug Fixes | ||
* anyToAppError to keep stack ([a815f2d](https://github.com/NaturalCycles/js-lib/commit/a815f2d)) | ||
## [4.10.1](https://github.com/NaturalCycles/js-lib/compare/v4.10.0...v4.10.1) (2019-05-08) | ||
@@ -2,0 +9,0 @@ |
@@ -32,3 +32,4 @@ import { AppError, HttpError, isObject } from '..'; | ||
const e = anyToErrorObject(o); | ||
return new AppError(e.message, Object.assign({}, e.data, data)); | ||
Object.assign(e.data, data); | ||
return errorObjectToAppError(e); | ||
} | ||
@@ -35,0 +36,0 @@ export function errorToErrorObject(e) { |
@@ -36,3 +36,4 @@ "use strict"; | ||
const e = anyToErrorObject(o); | ||
return new __1.AppError(e.message, Object.assign({}, e.data, data)); | ||
Object.assign(e.data, data); | ||
return errorObjectToAppError(e); | ||
} | ||
@@ -39,0 +40,0 @@ exports.anyToAppError = anyToAppError; |
{ | ||
"name": "@naturalcycles/js-lib", | ||
"version": "4.10.1", | ||
"version": "4.10.2", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "build": "del ./dist && tsc", |
@@ -39,7 +39,5 @@ import { AppError, ErrorData, ErrorObject, HttpError, HttpErrorData, isObject } from '..' | ||
const e = anyToErrorObject(o) | ||
Object.assign(e.data, data) | ||
return new AppError<DATA_TYPE>(e.message, { | ||
...e.data, | ||
...data, | ||
} as DATA_TYPE) | ||
return errorObjectToAppError(e) | ||
} | ||
@@ -46,0 +44,0 @@ |
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
161960