Skip to content

Commit

Permalink
Don't send failures to SessionController in development environment (#…
Browse files Browse the repository at this point in the history
…2121)

Since bumping omniauth from 1.9.1 to 2.0.1 in our application all development errors have become failures. For example I purposefully introduce an error to a view. It is caught by omniauth and calls fail which means that we can no longer use better_errors to debug.

Opened a ticket with omniauth to see if they have any suggestions.
  • Loading branch information
pgwillia authored Jan 26, 2021
1 parent fe8409b commit ea9d66c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and releases in Jupiter project adheres to [Semantic Versioning](http://semver.o
– Turn off reporting things like "this excel spreadsheet isn't thumbnailable" as warnings to Rollbar [PR#2046](https://github.com/ualbertalib/jupiter/pull/2046)
- migration to fix concatenated subjects (part 2) [#1449](https://github.com/ualbertalib/jupiter/issues/1449)
- Catch and log embargo expiry job save errors [#1989](https://github.com/ualbertalib/jupiter/issues/1989)
- Don't send failures to SessionController in development environment [PR#2121](https://github.com/ualbertalib/jupiter/pull/2121)

### Fixed
- bump rubocop and fix cop violations [PR#2072](https://github.com/ualbertalib/jupiter/pull/2072)
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/omniauth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# By default in development mode, omniauth raises an exception when authentication fails
# comment this line if you want to see the stacktrace from the actual provider when in `development`
# Uncomment the line below to turn this behavior off
on_failure { |env| SessionsController.action(:failure).call(env) }
on_failure { |env| SessionsController.action(:failure).call(env) } unless Rails.env.development?

OmniAuth.config.allowed_request_methods = [:post]
OmniAuth.config.logger = Rails.logger
Expand Down

0 comments on commit ea9d66c

Please sign in to comment.