Code Monkey home page Code Monkey logo

Comments (5)

nbulaj avatar nbulaj commented on May 20, 2024

Hey @henrikbjorn . Unfortunately this is an expected behavior as we refactored gem internals. So I can suggest you to follow the new way how errors work.

Can you please give more details about an error you're facing with the latest update and your gem? Maybe we can do some backward compatible changes to support something you (and maybe anyone else) need in your gem. Also will ping @camero2734 just in case

from doorkeeper.

henrikbjorn avatar henrikbjorn commented on May 20, 2024

Hey @henrikbjorn . Unfortunately this is an expected behavior as we refactored gem internals. So I can suggest you to follow the new way how errors work.

Can you please give more details about an error you're facing with the latest update and your gem? Maybe we can do some backward compatible changes to support something you (and maybe anyone else) need in your gem. Also will ping @camero2734 just in case

It make sense that such a change would requiring changes to other gems, however I think it is a regression it was done in a minor release.

I am getting a MethodNotDefined error as the symbol does not have to new to_response_name method.

from doorkeeper.

henrikbjorn avatar henrikbjorn commented on May 20, 2024

A mitigation could be to convert the symbol into the matching error class dynamically. eg. "Errors::#{error.to_s.classify}".constantize

from doorkeeper.

bockets avatar bockets commented on May 20, 2024

Seeing a similar issue while using doorkeeper-openid__connect v1.8.7:

undefined method `name_for_response' for :access_denied:Symbol (NoMethodError)

            name: request.error&.name_for_response,
                               ^^^^^^^^^^^^^^^^^^^
doorkeeper (5.6.8) lib/doorkeeper/oauth/error_response.rb in from_request at line 13

from doorkeeper.

nbulaj avatar nbulaj commented on May 20, 2024

A mitigation could be to convert the symbol into the matching error class dynamically. eg. "Errors::#{error.to_s.classify}".constantize

Hey @henrikbjorn . Yeah, looks like this. We have to check if responds_to?(:name_for_response) and try to constantize if it doesn't (or constantize if Symbol otherwise call a method). Would you like to produce a PR?

from doorkeeper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.