500 error page not showing on Heroku

不打扰是莪最后的温柔 提交于 2020-01-21 13:19:36

问题


I'm trying to get a custom 500 error page to show on Heroku, running rails 3.2.11

I've followed the steps at: https://devcenter.heroku.com/articles/error-pages

The process worked fine for the maintenance page, but doesn't seem to work for the error page. I'm positive the S3 URL is correct in Heroku, and when I visit the S3 URL directly I can view the error page just fine (it is set to public).

config.consider_all_requests_local is set to false in production.rb

Any ideas as to why Heroku is not showing it? I just get a blank screen in various browsers (Chrome says it's a 500 error but doesn't render a page).


回答1:


The heroku's custom error page isn't displayed whenever an exception occurs in your application.

Your application is responsible for displaying this kind of pages.
See using exceptions_app with rails 3.2.

The error page happens when an error occurs with heroku.

The devcenter page about error pages says, about testing your error page :

To test your error page, you can push a bad deploy such as putting a syntax error into a key configuration file, or by creating a path on your app that sleeps for 35 seconds (thereby triggering the error H12 Request Timeout.



来源:https://stackoverflow.com/questions/16351239/500-error-page-not-showing-on-heroku

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!