Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Add 404 and 500 error handling #58

Merged
merged 2 commits into from
Oct 19, 2020
Merged

Add 404 and 500 error handling #58

merged 2 commits into from
Oct 19, 2020

Conversation

ankush
Copy link
Collaborator

@ankush ankush commented Oct 19, 2020

Add 404 and 500 error handling.
Add simple 404.html template which can be improved later.

related to #46

Add 500 error handler route with simple warning to end user
@BlairCurrey BlairCurrey self-requested a review October 19, 2020 15:47
@BlairCurrey BlairCurrey self-assigned this Oct 19, 2020
@BlairCurrey BlairCurrey removed their request for review October 19, 2020 15:48
@BlairCurrey
Copy link
Collaborator

Any suggestion how to test 500 error handling? Trying to figure out a way atm.

@ankush
Copy link
Collaborator Author

ankush commented Oct 19, 2020

One example: writing a very large review will crash Body parser and crash server IIRC. That would normally give you JS error stack, now it will only show 500 error to users.
You can still see stack in console.

@BlairCurrey
Copy link
Collaborator

OK, in order to test for a 500 error I added throw new Exception(); to a route and used it. The 500 error handling works.

@BlairCurrey BlairCurrey merged commit a129f5a into master Oct 19, 2020
@ankush ankush deleted the error-pages branch October 19, 2020 16:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants