Hi!
I find myself always writing an extension to this library in situ to add the two first features mentioned. I'm wondering if you would accept a PR that adds these. Here's what I would do:
- Add a base HttpError class
- Make existing error classes extend from that
- Add an optional
code?: string parameter that would allow front-end consumers to differentiate errors better
- Add a few more error types (409, 500, 501, 502, 503, 504)
- In-house typescript definitions (i.e., change the repo to a typescript repo)
If not, I understand, I know it's a bunch of changes. I just didn't want to make a duplicate package on npm. Lemme know what you think.