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: don't forward error from decodeURI to next middleware #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rchl
Copy link
Member

@rchl rchl commented Apr 20, 2020

Instead of forwarding error from decodeURI further to the
error middleware and subsequently triggering 500 response, just ignore it.

Ignoring the error will likely crash in Nuxt later anyway but that
is better as:

  • This package won't get the blame when error shows up locally or in production
  • Error triggered within Nuxt doesn't trigger 500 but 400 response
    which is better as this is input error rather than server error.

Instead of forwarding error from `decodeuRI` further to the
error middleware and subsequently triggering 500 response, just ignore it.

Ignoring the error will likely crash in Nuxt later anyway but that
is better as:
 - This package won't get the blame when error shows up locally or in production
 - Error triggered within Nuxt doesn't trigger 500 but 400 response
   which is better as this is input error rather than server error.
@rchl rchl force-pushed the fix/dont-error-on-invalid-uri branch from 74b5148 to a0b7b6e Compare April 20, 2020 11:47
@codecov
Copy link

codecov bot commented Apr 20, 2020

Codecov Report

Merging #76 (a0b7b6e) into master (a796553) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #76   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           37        37           
  Branches         8         8           
=========================================
  Hits            37        37           
Impacted Files Coverage Δ
lib/module.js 100.00% <100.00%> (ø)

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 a796553...a0b7b6e. Read the comment docs.

@rchl
Copy link
Member Author

rchl commented Nov 20, 2021

No one in here?

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.

1 participant