node-oauth / express-oauth-server

🔒 Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with express in node.js
https://www.npmjs.com/package/@node-oauth/express-oauth-server
MIT License
27 stars 8 forks source link

Fixed possible invalid status code range error #15

Closed dylantmarsh closed 1 year ago

dylantmarsh commented 1 year ago

If error.code is undefined, this can result in a RangeError where the HTTP status code is invalid. This will cause the application to crash, swallowing the actual error.

dylantmarsh commented 1 year ago

I am open to a more appropriate status code for this to default to.