You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 11, 2018. It is now read-only.
http-errors seems to do the same thing except it's part of jshttp, which seems to be the closest thing to a standard collection of HTTP-related modules the node community has. As far as I can see the only real difference is that httperr includes some non-standard HTTP errors that the jshttp statuses module doesn't include.
I'm considering deprecating httperr in favour of http-errors to avoid redundancy/NIH. Does anybody see a reason not to? Is there anything httperr can do that isn't supported by http-errors yet?
The text was updated successfully, but these errors were encountered:
More consistent CamelCasing of error names (I'mateapot, URITooLong, etc => ImATeapot, UriTooLong and so on). See jshttp/http-errors#9.
Fix constructor names (use eval 😦 or code generation à la statuses 😐). See discussion at jshttp/http-errors#12.
Replace __proto__ assignment and captureStacktrace with something that works outside V8. See discussion at jshttp/http-errors#11.
Allow calling constructors without new? (already supported)
Provide a mechanism of passing extra information (allowed methods for MethodNotAllowed, etc)? (not important)
I'll open PRs to propose fixes.
Some concerns httperr addresses are irrelevant:
title (and any of the other derived attributes) is solved by statuses. If you want to find out the human-readable name of an error, just look it up there.
non-standard error codes (e.g. 420 Enhance Your Calm) -- these can be added to statuses if they have any real-world value. Also screw twitter's old API, 420 may be funny, but you should be using 429.
http-errors
seems to do the same thing except it's part of jshttp, which seems to be the closest thing to a standard collection of HTTP-related modules the node community has. As far as I can see the only real difference is thathttperr
includes some non-standard HTTP errors that the jshttpstatuses
module doesn't include.I'm considering deprecating
httperr
in favour ofhttp-errors
to avoid redundancy/NIH. Does anybody see a reason not to? Is there anythinghttperr
can do that isn't supported byhttp-errors
yet?The text was updated successfully, but these errors were encountered: