Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: remove default statusMessage from errors #195

Merged
merged 1 commit into from Oct 15, 2022
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Oct 15, 2022

Resolves #187

As suggested by @maicss, HTTP agents and servers (edge, browser, curl, etc) already resolve to the correct corresponding message for each error code. We don't need to bundle a preset of them or add a rather misleading "Internal Server Error" to all thrown errors.

@codecov
Copy link

codecov bot commented Oct 15, 2022

Codecov Report

Merging #195 (8f908e0) into main (b986629) will decrease coverage by 0.17%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #195      +/-   ##
==========================================
- Coverage   78.83%   78.65%   -0.18%     
==========================================
  Files          19       19              
  Lines        1044     1059      +15     
  Branches      208      209       +1     
==========================================
+ Hits          823      833      +10     
- Misses        221      226       +5     
Impacted Files Coverage Δ
src/error.ts 89.00% <100.00%> (+0.57%) ⬆️
src/router.ts 94.79% <0.00%> (-5.21%) ⬇️
src/app.ts 93.75% <0.00%> (+0.13%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@pi0 pi0 merged commit 4229ce0 into main Oct 15, 2022
@pi0 pi0 deleted the fix/no-default-message branch October 15, 2022 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add default statusMessage
1 participant