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

@dotcom-reliability-kit/errors

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotcom-reliability-kit/errors - npm Package Compare versions

Comparing version 3.1.1 to 3.1.2

14

lib/base-error.js
/**
* @typedef {import('@dotcom-reliability-kit/errors').BaseErrorData} ErrorData
* @import { BaseError as BaseErrorType, BaseErrorData as ErrorData } from '@dotcom-reliability-kit/errors'
*/

@@ -12,3 +12,3 @@

* @readonly
* @type {import('@dotcom-reliability-kit/errors').BaseError['name']}
* @type {BaseErrorType['name']}
*/

@@ -21,3 +21,3 @@ name = 'BaseError';

* @readonly
* @type {import('@dotcom-reliability-kit/errors').BaseError['isOperational']}
* @type {BaseErrorType['isOperational']}
*/

@@ -30,3 +30,3 @@ isOperational = false;

* @readonly
* @type {import('@dotcom-reliability-kit/errors').BaseError['code']}
* @type {BaseErrorType['code']}
*/

@@ -39,3 +39,3 @@ code = BaseError.defaultCode;

* @readonly
* @type {import('@dotcom-reliability-kit/errors').BaseError['cause']}
* @type {BaseErrorType['cause']}
*/

@@ -48,3 +48,3 @@ cause = null;

* @readonly
* @type {import('@dotcom-reliability-kit/errors').BaseError['data']}
* @type {BaseErrorType['data']}
*/

@@ -127,3 +127,3 @@ data = {};

/**
* @type {(typeof import('@dotcom-reliability-kit/errors').BaseError)['isErrorMarkedAsOperational']}
* @type {(typeof BaseErrorType)['isErrorMarkedAsOperational']}
*/

@@ -130,0 +130,0 @@ static isErrorMarkedAsOperational(error) {

const OperationalError = require('./operational-error');
/**
* @import { DataStoreError as DataStoreErrorType } from '@dotcom-reliability-kit/errors'
*/
/**
* Class representing an error in an application's data store.

@@ -10,3 +14,3 @@ */

* @readonly
* @type {import('@dotcom-reliability-kit/errors').DataStoreError['name']}
* @type {DataStoreErrorType['name']}
*/

@@ -13,0 +17,0 @@ name = 'DataStoreError';

const OperationalError = require('./operational-error');
/**
* @import { HttpError as HttpErrorType, HttpErrorData as ErrorData } from '@dotcom-reliability-kit/errors'
*/
/**
* We have guards in place wherever we use this map of status messages

@@ -14,6 +18,2 @@ * which means we can safely cast it to an object where every property

/**
* @typedef {import('@dotcom-reliability-kit/errors').HttpErrorData} ErrorData
*/
/**
* Class representing an HTTP error.

@@ -25,3 +25,3 @@ */

* @readonly
* @type {import('@dotcom-reliability-kit/errors').HttpError['name']}
* @type {HttpErrorType['name']}
*/

@@ -32,3 +32,3 @@ name = 'HttpError';

* @readonly
* @type {import('@dotcom-reliability-kit/errors').HttpError['statusCode']}
* @type {HttpErrorType['statusCode']}
*/

@@ -39,3 +39,3 @@ statusCode;

* @readonly
* @type {import('@dotcom-reliability-kit/errors').HttpError['statusMessage']}
* @type {HttpErrorType['statusMessage']}
*/

@@ -45,3 +45,3 @@ statusMessage;

/**
* @type {import('@dotcom-reliability-kit/errors').HttpError['status']}
* @type {HttpErrorType['status']}
*/

@@ -48,0 +48,0 @@ get status() {

const BaseError = require('./base-error');
/**
* @typedef {import('@dotcom-reliability-kit/errors').OperationalErrorData} ErrorData
* @import { OperationalError as OperationalErrorType, OperationalErrorData as ErrorData } from '@dotcom-reliability-kit/errors'
*/

@@ -14,3 +14,3 @@

* @readonly
* @type {import('@dotcom-reliability-kit/errors').OperationalError['name']}
* @type {OperationalErrorType['name']}
*/

@@ -24,3 +24,3 @@ name = 'OperationalError';

* @readonly
* @type {import('@dotcom-reliability-kit/errors').OperationalError['isOperational']}
* @type {OperationalErrorType['isOperational']}
*/

@@ -34,3 +34,3 @@ isOperational = true;

* @readonly
* @type {import('@dotcom-reliability-kit/errors').OperationalError['relatesToSystems']}
* @type {OperationalErrorType['relatesToSystems']}
*/

@@ -37,0 +37,0 @@ relatesToSystems = [];

const HttpError = require('./http-error');
/**
* @import { UpstreamServiceError as UpstreamServiceErrorType } from '@dotcom-reliability-kit/errors'
*/
/**
* Class representing an error in an upstream service.

@@ -10,3 +14,3 @@ */

* @readonly
* @type {import('@dotcom-reliability-kit/errors').UpstreamServiceError['name']}
* @type {UpstreamServiceErrorType['name']}
*/

@@ -13,0 +17,0 @@ name = 'UpstreamServiceError';

const HttpError = require('./http-error');
/**
* @import { UserInputError as UserInputErrorType } from '@dotcom-reliability-kit/errors'
*/
/**
* Class representing an error caused by invalid user input.

@@ -10,3 +14,3 @@ */

* @readonly
* @type {import('@dotcom-reliability-kit/errors').UserInputError['name']}
* @type {UserInputErrorType['name']}
*/

@@ -13,0 +17,0 @@ name = 'UserInputError';

{
"name": "@dotcom-reliability-kit/errors",
"version": "3.1.1",
"version": "3.1.2",
"description": "A suite of error classes which help you throw the most appropriate error in any situation",

@@ -14,4 +14,3 @@ "repository": {

"engines": {
"node": "18.x || 20.x || 22.x",
"npm": "8.x || 9.x || 10.x"
"node": "18.x || 20.x || 22.x"
},

@@ -18,0 +17,0 @@ "main": "lib/index.js",

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