2.2.5 • Published 2 months ago

@code-like-a-carpenter/errors v2.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

@code-like-a-carpenter/errors

standard-readme compliant

Common errors usable across projects

At present, this package contains the http errors based MDN's list of HTTP status codes.

Table of Contents

Install

npm i @code-like-a-carpenter/errors

Usage

import {NotFound} from '@code-like-a-carpenter/errors';

try {
    const result = loadFromDatabase();
} catch (err) {
    if (err.message === 'NoSuchRecord') {
        throw new NotFound('Could not find resource', {cause: err});
    }
    throw err;
}

Maintainer

Ian Remmel

Contributing

Please see contributing guidelines at the project homepage.

License

MIT © Ian Remmel 2023 until at least now

2.2.5

2 months ago

2.2.4

2 months ago

2.2.3

2 months ago

2.2.2

2 months ago

2.2.1

3 months ago

2.2.0

3 months ago

2.1.0

3 months ago

2.0.0

4 months ago

1.0.2

9 months ago

1.0.1

1 year ago

1.0.0

1 year ago