Skip to content
This repository has been archived by the owner on May 14, 2020. It is now read-only.

Simplify creating HTTP errors #194

Merged
merged 2 commits into from
Jan 21, 2020

Conversation

thewilkybarkid
Copy link
Contributor

Contrary to its documentation, the http-errors module doesn't create a new error if it is already an HTTP error, so we don't need to check its type locally.

@thewilkybarkid thewilkybarkid added the 📦 Refactor A code change that neither fixes a bug nor adds a feature label Jan 21, 2020
@thewilkybarkid thewilkybarkid requested a review from a team as a code owner January 21, 2020 09:43
@giorgiosironi
Copy link
Member

I'd like to try to write a characterization test given it's an undocumented behavior if this is not urgent - more for my learning than for likelihood of future breakages which is minimal.

@thewilkybarkid
Copy link
Contributor Author

More meant that it doesn't replicate the same error, rather than being something that unexpected.

Copy link
Member

@nlisgo nlisgo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thewilkybarkid is there a related open issue on the http-errors project. At least to address the documentation?

@thewilkybarkid
Copy link
Contributor Author

Commented at jshttp/http-errors#37 (comment).

@thewilkybarkid thewilkybarkid merged commit 3748b39 into libero:master Jan 21, 2020
@thewilkybarkid thewilkybarkid deleted the create-http-error branch January 21, 2020 12:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📦 Refactor A code change that neither fixes a bug nor adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants