action #13192
closedMore helpful exception handler web pages
0%
Description
user story¶
- As a user of an openQA web instance I want error pages with more details than just the puking trex to help development and get the issues I encounter fixed fast
acceptance criteria¶
- AC1: If an error 500 is hit, a page is rendered which has the content available in the logfiles also rendered as part of the page
tasks¶
- research http://mojolicious.org/perldoc/Mojolicious/Guides/Rendering#Rendering-exception-and-not_found-pages and http://stackoverflow.com/questions/13272220/mojolicious-lite-how-to-redirect-for-not-found-and-server-error-pages-to-user-de
- I guess we have a better one when the system is run in "development mode", why not use that?
- optional: Extend to 404 errors
- optional: Provide custom template with a reference how to file issues here on progress
- optional but super cool: Opening a new issue template with content from the exception prefilled or attached to a progress issue
Updated by okurz over 8 years ago
We could simply
for page in exception not_found; do
ln -s $(rpm -ql perl-Mojolicious | grep debug.html.ep) /etc/openqa/templates/${page}.html.ep
done
to show useful error pages in case we don't see security issues with potential leaking of internal config in the log files, e.g. for osd we could do this at least.
https://github.com/os-autoinst/openQA/pull/831 and https://github.com/os-autoinst/openQA/issues/842 have been provided already.
It looks like it would be nice if we provide a PR to upstream Mojolicious to have the route view in a separate template file or helper function so that we could render this as part of a custom page including the nice colors but w/o the debug content.
Updated by coolo over 8 years ago
This is very bad style to mix user roles. You're not a 'user of openqa' - you're a developer. Users don't care why the app crashed - they only want it working. The log is for the developer then. Don't mix production mode and development mode - they are different modes for a reason.
Updated by okurz over 8 years ago
coolo wrote:
This is very bad style to mix user roles.
That's your opinion.
Please see the goal of the "user" in the user story: "… to get the issues I encounter fixed fast".
An alternative might be for us to have better monitoring of the errors in the logfiles and react on them.
My idea was that a user could have some more information than just "this did not work" so that he could provide a helpful bug report. What Martchus provided as a proposal in https://github.com/os-autoinst/openQA/pull/831 is a custom template with a pointer where to provide bug reports. We could also not provide any details but just ask the user to write a bug report, tell which steps he did and exactly at which time (for developers to be able to crosscheck logfiles with a timestamp). WDYT?
Updated by mkittler over 8 years ago
- Status changed from In Progress to Resolved
Deployed and working in production: https://openqa.opensuse.org/test
Updated by okurz over 8 years ago
I guess I have to agree here although my original intention was something else, especially regarding the internal server error pages. But I can agree to track this with better monitoring of log file content instead.