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

NotImplementedError error response must define #exception_class after upgrading to 5.6.7 from 5.6.6 #1679

Closed
brent-cybrid opened this issue Nov 23, 2023 · 4 comments · Fixed by #1680

Comments

@brent-cybrid
Copy link

Steps to reproduce

Set handle_auth_errors :raise in the doorkeeper initializer

Expected behavior

get '/oauth/authorize' should return with a 200 status code

Actual behavior

Receiving the following stack trace:

NotImplementedError:
error response must define #exception_class
# /Users/brent/.gem/ruby/3.2.2/gems/doorkeeper-5.6.7/lib/doorkeeper/oauth/error_response.rb:75:in exception_class' # /Users/brent/.gem/ruby/3.2.2/gems/doorkeeper-5.6.7/lib/doorkeeper/oauth/error_response.rb:65:in raise_exception!'
# /Users/brent/.gem/ruby/3.2.2/gems/doorkeeper-5.6.7/app/controllers/doorkeeper/authorizations_controller.rb:44:in render_error' # /Users/brent/.gem/ruby/3.2.2/gems/doorkeeper-5.6.7/app/controllers/doorkeeper/authorizations_controller.rb:11:in new'
# /Users/brent/.gem/ruby/3.2.2/gems/actiontext-7.1.2/lib/action_text/rendering.rb:23:in with_renderer' # /Users/brent/.gem/ruby/3.2.2/gems/actiontext-7.1.2/lib/action_text/engine.rb:69:in block (4 levels) in class:Engine'
# /Users/brent/.gem/ruby/3.2.2/gems/sentry-rails-5.13.0/lib/sentry/rails/controller_transaction.rb:28:in block in sentry_around_action' # /Users/brent/.gem/ruby/3.2.2/gems/sentry-ruby-5.13.0/lib/sentry/hub.rb:102:in with_child_span'
# /Users/brent/.gem/ruby/3.2.2/gems/sentry-ruby-5.13.0/lib/sentry-ruby.rb:476:in with_child_span' # /Users/brent/.gem/ruby/3.2.2/gems/sentry-rails-5.13.0/lib/sentry/rails/controller_transaction.rb:14:in sentry_around_action'
# /Users/brent/.gem/ruby/3.2.2/gems/omniauth-2.1.1/lib/omniauth/strategy.rb:202:in call!' # /Users/brent/.gem/ruby/3.2.2/gems/omniauth-2.1.1/lib/omniauth/strategy.rb:169:in call'
# /Users/brent/.gem/ruby/3.2.2/gems/omniauth-2.1.1/lib/omniauth/strategy.rb:202:in call!' # /Users/brent/.gem/ruby/3.2.2/gems/omniauth-2.1.1/lib/omniauth/strategy.rb:169:in call'
# /Users/brent/.gem/ruby/3.2.2/gems/warden-1.2.9/lib/warden/manager.rb:36:in block in call' # /Users/brent/.gem/ruby/3.2.2/gems/warden-1.2.9/lib/warden/manager.rb:34:in catch'
# /Users/brent/.gem/ruby/3.2.2/gems/warden-1.2.9/lib/warden/manager.rb:34:in call' # /Users/brent/.gem/ruby/3.2.2/gems/aws-healthcheck-2.0.0/lib/healthcheck/middleware.rb:11:in call'
# /Users/brent/.gem/ruby/3.2.2/gems/rack-2.2.8/lib/rack/tempfile_reaper.rb:15:in call' # /Users/brent/.gem/ruby/3.2.2/gems/rack-2.2.8/lib/rack/etag.rb:27:in call'
# /Users/brent/.gem/ruby/3.2.2/gems/rack-2.2.8/lib/rack/conditional_get.rb:27:in call' # /Users/brent/.gem/ruby/3.2.2/gems/rack-2.2.8/lib/rack/head.rb:12:in call'
# /Users/brent/.gem/ruby/3.2.2/gems/rack-2.2.8/lib/rack/session/abstract/id.rb:266:in context' # /Users/brent/.gem/ruby/3.2.2/gems/rack-2.2.8/lib/rack/session/abstract/id.rb:260:in call'
# /Users/brent/.gem/ruby/3.2.2/gems/sentry-rails-5.13.0/lib/sentry/rails/rescued_exception_interceptor.rb:12:in call' # /Users/brent/.gem/ruby/3.2.2/gems/sentry-ruby-5.13.0/lib/sentry/rack/capture_exceptions.rb:28:in block (2 levels) in call'
# /Users/brent/.gem/ruby/3.2.2/gems/sentry-ruby-5.13.0/lib/sentry/hub.rb:251:in with_session_tracking' # /Users/brent/.gem/ruby/3.2.2/gems/sentry-ruby-5.13.0/lib/sentry-ruby.rb:387:in with_session_tracking'
# /Users/brent/.gem/ruby/3.2.2/gems/sentry-ruby-5.13.0/lib/sentry/rack/capture_exceptions.rb:19:in block in call' # /Users/brent/.gem/ruby/3.2.2/gems/sentry-ruby-5.13.0/lib/sentry/hub.rb:59:in with_scope'
# /Users/brent/.gem/ruby/3.2.2/gems/sentry-ruby-5.13.0/lib/sentry-ruby.rb:367:in with_scope' # /Users/brent/.gem/ruby/3.2.2/gems/sentry-ruby-5.13.0/lib/sentry/rack/capture_exceptions.rb:18:in call'
# /Users/brent/.gem/ruby/3.2.2/gems/railties-7.1.2/lib/rails/rack/logger.rb:37:in call_app' # /Users/brent/.gem/ruby/3.2.2/gems/railties-7.1.2/lib/rails/rack/logger.rb:24:in block in call'
# /Users/brent/.gem/ruby/3.2.2/gems/railties-7.1.2/lib/rails/rack/logger.rb:24:in call' # /Users/brent/.gem/ruby/3.2.2/gems/request_store-1.5.1/lib/request_store/middleware.rb:19:in call'
# /Users/brent/.gem/ruby/3.2.2/gems/rack-2.2.8/lib/rack/method_override.rb:24:in call' # /Users/brent/.gem/ruby/3.2.2/gems/rack-2.2.8/lib/rack/runtime.rb:22:in call'
# /Users/brent/.gem/ruby/3.2.2/gems/rack-2.2.8/lib/rack/sendfile.rb:110:in call' # /Users/brent/.gem/ruby/3.2.2/gems/rack-cors-2.0.1/lib/rack/cors.rb:102:in call'
# /Users/brent/.gem/ruby/3.2.2/gems/railties-7.1.2/lib/rails/engine.rb:529:in call' # /Users/brent/.gem/ruby/3.2.2/gems/rack-test-2.1.0/lib/rack/test.rb:360:in process_request'
# /Users/brent/.gem/ruby/3.2.2/gems/rack-test-2.1.0/lib/rack/test.rb:153:in request' # /Users/brent/.gem/ruby/3.2.2/gems/rails-controller-testing-1.0.5/lib/rails/controller/testing/integration.rb:16:in block (2 levels) in module:Integration'

System configuration

Issue is only present after updating to Doorkeeper 5.6.7 from 5.6.6.

@nbulaj
Copy link
Member

nbulaj commented Nov 23, 2023

Looks like from #1676

@camero2734 can you take a look please?

@camero2734
Copy link
Contributor

@nbulaj Yeah my bad, found the issue and made #1680 to fix it 👍

@nbulaj
Copy link
Member

nbulaj commented Nov 29, 2023

Hi @brent-cybrid . Can you please check if you issue is fixed using this gem and branch?

https://github.com/camero2734/doorkeeper/tree/fix-not-implemented-error-raise

camero2734:fix-not-implemented-error-raise

I wanna be sure we closed it

@brent-cybrid
Copy link
Author

Hi @brent-cybrid . Can you please check if you issue is fixed using this gem and branch?

https://github.com/camero2734/doorkeeper/tree/fix-not-implemented-error-raise

camero2734:fix-not-implemented-error-raise

I wanna be sure we closed it

Fix looks good. Thank you!

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

Successfully merging a pull request may close this issue.

3 participants