@dotcom-reliability-kit/errors
Advanced tools
Comparing version 3.1.1 to 3.1.2
/** | ||
* @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", |
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
492
23206