This project is archived and is in readonly mode.
Failsafe middleware doesn't render 500.html as ERB
Reported by Hongli Lai | May 25th, 2009 @ 04:41 PM
500.html is actually an ERB template: it instructs the reader to read the appropriate log file to find out what went wrong, in case he's the administrator. This is good for usability because apparently a lot of people don't know that they're supposed to read the log file.
The Rescue middleware correctly renders 500.html as ERB, but the Failsafe middleware does not. This patch solves the problem, and also adds unit tests for Failsafe. It also makes the default static Failsafe response (which is returned in case ERB rendering fails as well) more friendly.
This patch is for Rails 2.3.
Comments and changes to this ticket
-
Hongli Lai May 25th, 2009 @ 04:42 PM
- Tag set to 2-3-stable
-
CancelProfileIsBroken May 25th, 2009 @ 05:04 PM
ERB was removed from 500.html in 81c7a5d48d972c9e3973b4c018fafae1dfd9c0de and the code to render it was removed in 10b6073968eb43a3e20efd352d97d08720beeb12
-
josh May 25th, 2009 @ 05:26 PM
- Assigned user set to josh
- State changed from new to open
- Milestone cleared.
-
Hongli Lai May 25th, 2009 @ 06:50 PM
Hm, I see. But it's still a huge usability issue. "Help my app says that something went wrong but I don't know what to do!" is one of the most often asked questions, and especially people who have little prior experience with administering Unix systems do not know that they're supposed to look in log files.
Here's a new patch. It removes the ERB rendering but it retains the improved error messages.
-
Pratik May 26th, 2009 @ 01:54 PM
We shouldn't put "(If you're the administrator of this website, then please read this application's log file and/or the web server's log file to find out what went wrong.)" message. Especially after "we've been notified".
-
Jeremy Kemper May 27th, 2009 @ 12:12 AM
I think it's a good change that gently pushes new Rails devs the right direction. Most production apps have replaced their 500.html with something better anyway.
-
Repository May 27th, 2009 @ 09:02 PM
- State changed from open to resolved
(from [34a1ed0df8311aba350043ec7ef373da3058855f]) Make the Failsafe middleware attempt to render 500.html during failsafe response rendering. Also make the default static failsafe response more friendly, in case 500.html rendering fails. [#2715 state:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com
http://github.com/rails/rails/commit/34a1ed0df8311aba350043ec7ef373...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 2714 Failsafe middleware doesn't render 500.html as ERB Please close this issue. It's a duplicate of #2715. My In...
- 2716 Default ShowExceptions error message is not friendly enough Issue #2715 has a similar patch for Rails 2.3.
- 2715 Failsafe middleware doesn't render 500.html as ERB (from [34a1ed0df8311aba350043ec7ef373da3058855f]) Make th...