Add friendly error pages
DavidBiddle opened this issue · comments
This should include:
404 for page not found
500 for unexpected errors
Service unavailable (in case we need to take the service down temporarily)
Notify error (special case of the 500 error with some extra text about the submission failing)
I've run into an issue here:
- forms-runner uses
/form_id
routes to navigate to a form, whereform_id
is an integer - Rails wants to use
/404
and/500
for error pages
So there will be a conflict if/whenform_id
is 404 or 500.
I can try writing some more custom logic for handling the error, or we can change the path where forms are hosted, but since we already have a task in the current sprint to look at the URLs forms live at, it might be easier and more opportune to change the form route instead.
Yes saving the /
might make our lives easier in the future if we ever want to add more pages in there.
For now at least I'll remove the path: "/"
from the forms entry in routes.rb, so forms will now be at /form/1
and pages will now be at /form/1/1
.