Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

new-error

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

new-error - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

15

build/interfaces.d.ts

@@ -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 @@

2

package.json
{
"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')

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc