Comparing version 1.0.8 to 1.0.9
@@ -94,2 +94,17 @@ /** | ||
/** | ||
* Set the error type | ||
* @param type | ||
*/ | ||
withErrorType(type: string): this; | ||
/** | ||
* Set high level error code | ||
* @param code | ||
*/ | ||
withErrorCode(code: string | number): this; | ||
/** | ||
* Set low level error code | ||
* @param subCode | ||
*/ | ||
withErrorSubCode(subCode: string | number): this; | ||
/** | ||
* Adds metadata that will be included with toJSON() serialization. | ||
@@ -96,0 +111,0 @@ * Multiple calls will append and not replace. |
@@ -0,1 +1,7 @@ | ||
## 1.0.9 - Sat May 16 2020 00:39:12 | ||
**Contributor:** Theo Gravity | ||
- Add missing methods to `IBaseError` (#3) | ||
## 1.0.8 - Sat May 16 2020 00:20:35 | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "new-error", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "A production-grade error creation and serialization library designed for Typescript", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -213,2 +213,3 @@ # new-error | ||
const err = new InternalServerError('There was a database failure, SQL err code %s') | ||
// calling these methods are optional | ||
.withErrorType('DATABASE_FAILURE') | ||
@@ -215,0 +216,0 @@ .withErrorCode('ERR_INT_500') |
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
48721
659
539
83