@whi/serious-error-types

0.1.10 • Public • Published

Serious Error Types

This module brings a hierarchy of well defined error types to help make error handling a proactive measure rather than a reactive obligation.

Overview

The ethos behind the hierarchy of types is set of failure mode strategies for creating robust and deterministic code.

The "Serious" in this module's name implies that these error types are for developers who take their code seriously; it should not imply that the errors are critical, dangerous, or severe.

Error Hierarchy

Error
 |
 |- EvalError
 |- InternalError
 |- RangeError
 |- ReferenceError
 |- SyntaxError
 |- TypeError
 |- URIError
 |
 '- SeriousError
     |
     |- InputError
     |   |- MissingArgumentError
     |   '- InvalidArgumentError
     |
     |- DatabaseError
     |   |- DatabaseQueryError
     |   '- ItemNotFoundError
     |
     |- AuthError
     |   |- AuthenticationError
     |   '- AuthorizationError
     |
     '- HTTPError
         |- HTTPRequestError
         |   '- NotFoundError
         |   '- MethodNotAllowedError
         '- HTTPResponseError

Readme

Keywords

none

Package Sidebar

Install

npm i @whi/serious-error-types

Weekly Downloads

1

Version

0.1.10

License

ISC

Unpacked Size

20.7 kB

Total Files

4

Last publish

Collaborators

  • brisebom