Giter Site home page Giter Site logo

Comments (6)

koraktor avatar koraktor commented on July 17, 2024

Strange, doing a plain ruby fails while bundle exec ruby works like expected with Octokit::NotFound. The versions of Octokit and Faraday are the same for both invocations.

from octokit.rb.

sferik avatar sferik commented on July 17, 2024

I'm guessing you have Faraday 0.7 installed on your system, which includes its own RaiseError class that's getting loaded before the Octokit RaiseError class. I'll work on a patch.

from octokit.rb.

koraktor avatar koraktor commented on July 17, 2024

No, only Faraday 0.6.1 (which is loaded) and 0.5.7 are installed. But 0.6.1 has a faraday/response/raise_error.rb too, so I guess this might help. Will test this.

Will there be a new version including this fix?

from octokit.rb.

koraktor avatar koraktor commented on July 17, 2024

Just tried the code in master giving me the following error which might be related:

/Library/Ruby/Gems/1.8/gems/multi_json-1.0.3/lib/multi_json/engines/yajl.rb:10:in `parse': input must be a string or IO (MultiJson::DecodeError)
    from /Library/Ruby/Gems/1.8/gems/multi_json-1.0.3/lib/multi_json/engines/yajl.rb:10:in `decode'
    from /Library/Ruby/Gems/1.8/gems/multi_json-1.0.3/lib/multi_json.rb:65:in `decode'
    from /Library/Ruby/Gems/1.8/gems/octokit-0.6.3/lib/faraday/response/raise_octokit_error.rb:35:in `error_message'
    from /Library/Ruby/Gems/1.8/gems/octokit-0.6.3/lib/faraday/response/raise_octokit_error.rb:16:in `on_complete'
    ...

The input, i.e. body in error_message is <#Hashie::Rash error="Not Found">.

At least the right on_complete method is now called.

from octokit.rb.

catsby avatar catsby commented on July 17, 2024

Can you provide the repository you're trying this with? I can't seem to reproduce the error. I've tried Octokit 0.6.3 and the code from master

from octokit.rb.

koraktor avatar koraktor commented on July 17, 2024

It's not a repository specific error, it's a load path issue. But that has been fixed by @sferik's commit (f52bc90).

from octokit.rb.

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.