exception_handler
exception_handler copied to clipboard
Undefined method `save'
Running into the following error with db: true
Error during failsafe response: undefined method `save' for #<ExceptionHandler::Exception:0x007fb5300baa30>
.../exceptions_controller.rb:21:in `block in <class:ExceptionsController>'
Line 21:
before_action { @exception.save if @exception.valid? && ExceptionHandler.config.try(:db) }
Thanks - will fix this now.
Thanks @richpeck. Additionally it didn't seem that 404s were being saved to the DB?
Do they show in the browser?
They do. Everything else works.
Thanks - will look at this further. Did you see if 500 errors get saved?
The 500 errors do get saved, except I mostly run into the Undefined method `save' issue.
If a page is not found I'm throwing a 404 with:
raise ActionController::RoutingError.new('Not Found')
This does not get saved. However the 404 page is displayed.