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

Be able to customize the global exception handler #595

Merged
merged 23 commits into from
Dec 16, 2019
Merged

Conversation

LoicPoullain
Copy link
Member

@LoicPoullain LoicPoullain commented Dec 14, 2019

Issue

Fixes #370

Solution and steps

  • Extend the ExpressOptions interface.
  • Use another name for ExpressOptions.
  • Add the function renderError.
  • Add the function sendResponse.
  • Update handle-errors.
  • Add two acceptance tests.

Checklist

  • Add/update/check docs (code comments and docs/ folder).
  • Add/update/check tests.
  • Update/check the cli generators.

@codecov
Copy link

codecov bot commented Dec 14, 2019

Codecov Report

Merging #595 into v1-4-0 will increase coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           v1-4-0     #595      +/-   ##
==========================================
+ Coverage   99.26%   99.35%   +0.09%     
==========================================
  Files          65       67       +2     
  Lines        1085     1089       +4     
  Branches      266      263       -3     
==========================================
+ Hits         1077     1082       +5     
+ Misses          8        7       -1
Impacted Files Coverage Δ
packages/core/src/express/create-middleware.ts 100% <ø> (ø) ⬆️
packages/core/src/express/send-response.ts 100% <100%> (ø)
packages/core/src/express/handle-errors.ts 100% <100%> (+25%) ⬆️
...ackages/core/src/common/utils/render-error.util.ts 100% <100%> (ø)
packages/core/src/express/create-app.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f8645e...1bfac28. Read the comment docs.

@LoicPoullain LoicPoullain mentioned this pull request Dec 16, 2019
9 tasks
@LoicPoullain LoicPoullain merged commit dcc2138 into v1-4-0 Dec 16, 2019
@LoicPoullain LoicPoullain deleted the error-handler branch December 16, 2019 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant