@admixltd/admix-error
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

Admix-Error

Extends the JavaScript Error object with custom properties.

Calls parent constructor to set the error message and adds code, errorCode, manuallyThrown and innerException custom properties. Logs the final object using passed function, Elastic URL or Debug library with the tag error-custom.

Requirements

  • Nodejs >= 8.10

Example

const error = new ErrorCustom(message, statusCode, errorCode, baseError, logFunction);
  • {string} message Error message to set on the Error object
  • {number} statusCode HTTP status code
  • {number} errorCode The specific error code as defined in documentation
  • {Error} baseError Optional base exception to be included as innerException property
  • {Function|string} logFunction Optional function to log the error with. If not supplied, debug library will be used to log to the console with the tag error-custom. If a string is provided that is a

Auth

Added ES_USER && ES_PASS

Event Bridge

Added Eventbridge

Recent

Removed Elastic

Readme

Keywords

none

Package Sidebar

Install

npm i @admixltd/admix-error

Weekly Downloads

13

Version

2.0.2

License

Apache-2.0

Unpacked Size

87.8 kB

Total Files

20

Last publish

Collaborators

  • cr0wd
  • admix-ksmike