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

Prevent errors from causing a crash loop #57

Merged
merged 1 commit into from
Sep 4, 2018
Merged

Prevent errors from causing a crash loop #57

merged 1 commit into from
Sep 4, 2018

Conversation

leo
Copy link
Contributor

@leo leo commented Sep 4, 2018

The coverage decreased in #56, this PR brings it back to 100%.

But most importantly, if an error occurs while reading an error template, we don't try to read the error template again, but instead just render the default text error.

@leo leo added the enhancement New feature or request label Sep 4, 2018
@leo leo merged commit 2adab25 into master Sep 4, 2018
@leo leo deleted the coverage branch September 4, 2018 17:53
@mischnic
Copy link
Contributor

mischnic commented Sep 5, 2018

yarn test logs some errors since this got merged (test: error for request with malformed URI). I guess that was not intended?

Error: Any error occured while checking the file
    at Object.stat (.../serve-handler/test/integration.js:595:11)
    at Object.sendError (.../serve-handler/src/index.js:29:2179)
    at module.exports (.../serve-handler/src/index.js:45:17)
Error: Any error occured while checking the file
    at Object.createReadStream (.../serve-handler/test/integration.js:1241:11)
    at Object.sendError (.../serve-handler/src/index.js:29:2534)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants