These are chat archives for jshttp/jshttp
httpErrors[err.status] === err.constructorcould work, but that's awful.
typeof err.statusCode === 'number'and pray for the best.
http-errorsin a client and distinguish API errors from other JS errors (e.g. SyntaxError when parsing the body, or connection errors).
httperrfor both and it just makes sense to have one library for both, as error objects are really just shared data objects.
statusCodeand assume any error with a
statusCodeis an http-errors error.