Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phusion Passenger Support #87

Open
dwood-somniainc opened this issue Oct 15, 2019 · 2 comments
Open

Phusion Passenger Support #87

dwood-somniainc opened this issue Oct 15, 2019 · 2 comments

Comments

@dwood-somniainc
Copy link

dwood-somniainc commented Oct 15, 2019

I'm having a weird issue where its forcing a redirect to "500 Internal Server Error" default page, instead of the exception_handler show action for the not found error. The views work in development, but they don't work in production. The gem is not forcing a redirect for some odd reason.

I placed the exception config in all environment.rb files to see if that was the problem.

config.exception_handler = {
   dev: nil,
   email: "email@mail.com",
   exceptions: { :all => { layout: "exception"},
                        400 => { layout: "exception"},
                        500 => { layout: "exception"}
   }
}
@richpeck
Copy link
Owner

Hi there, many thanks for using the gem!

I use it live in production using Passenger, so I know it works 100%. Do you have a repo I could look at -- there may be some override or something preventing the gem from firing?

@dwood-somniainc
Copy link
Author

Here is the output of my log for the response that I receive.

Started GET "/ok" for 00.33.00.000 at 2019-
ActionController::RoutingError (No route matches
actionpack (5.2.3) lib/action_dispatch/middleware
actionpack (5.2.3) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb `process_request..
Processing by ExceptionHandler::ExceptionsController
Rendering exception_handler/mailers/new_exception
Rendered exception_handler/mailers/new_exception
Exception Sent To -> email@email.com
ExceptionHandler::ExceptionMailer#wew_exception

The exception mailer is firing off, but the exception views are not rendering for 404/500 pages with exception_handler overrides. Is there anything that I should be looking at, in terms of config files? Phusion/Nginx?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants