unjs / ipx

🖼️ High performance, secure and easy-to-use image optimizer.
MIT License
1.53k stars 61 forks source link

feat(middleware): add fallthrough option to handle error with next callback #116

Closed aaharu closed 1 year ago

aaharu commented 1 year ago

It's necessary to fall-through the error to change error response and logging.

codecov[bot] commented 1 year ago

Codecov Report

Merging #116 (5014a64) into main (3832a81) will increase coverage by 0.32%. The diff coverage is 35.71%.

:exclamation: Current head 5014a64 differs from pull request most recent head 2340d3b. Consider uploading reports for the commit 2340d3b to get more accurate results

@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
+ Coverage   58.27%   58.60%   +0.32%     
==========================================
  Files          10       10              
  Lines         906      802     -104     
  Branches       41       43       +2     
==========================================
- Hits          528      470      -58     
+ Misses        378      332      -46     
Impacted Files Coverage Δ
src/utils.ts 53.65% <15.38%> (-11.05%) :arrow_down:
src/middleware.ts 27.04% <53.33%> (+10.37%) :arrow_up:

... and 6 files with indirect coverage changes