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

Undefined method `save' #64

Open
dkobia opened this issue May 25, 2018 · 6 comments
Open

Undefined method `save' #64

dkobia opened this issue May 25, 2018 · 6 comments

Comments

@dkobia
Copy link

dkobia commented May 25, 2018

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) }
@richpeck
Copy link
Owner

Thanks - will fix this now.

@dkobia
Copy link
Author

dkobia commented May 25, 2018

Thanks @richpeck. Additionally it didn't seem that 404s were being saved to the DB?

@richpeck
Copy link
Owner

Do they show in the browser?

@dkobia
Copy link
Author

dkobia commented May 25, 2018

They do. Everything else works.

@richpeck
Copy link
Owner

Thanks - will look at this further. Did you see if 500 errors get saved?

@dkobia
Copy link
Author

dkobia commented May 25, 2018

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.

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