Giter Club home page Giter Club logo

Comments (4)

iwiznia avatar iwiznia commented on June 21, 2024

I am getting the same and to add more information, the response that causes this bug is 500 Internal Server Error, the body of the response is empty.

from php-github-api.

acrobat avatar acrobat commented on June 21, 2024

@dangrous or @iwiznia do you have an example call that triggers this behaviour? I would expect that the ErrorPlugin would handle the server error response and throw an exception

from php-github-api.

iwiznia avatar iwiznia commented on June 21, 2024

It's not any specific request, I am seeing this error pop up "randomly" and if I retry the request, it succeeds. I think it happens whenever it could not contact to the GH servers, thus the 500 error does not contain any data.
The PR I submitted to you fixes the problem.

from php-github-api.

tomcorbett avatar tomcorbett commented on June 21, 2024

@acrobat - from what I see - there are cases (consistently) where GitHub returns 204 "No Content" i.e. https://api.github.com/repos/tomsausage/empty-public/contributors

E.g. in

        // in the (sometimes) valid case that there is no content e.g. getting contributors where there are none
        // GitHub seems not to return an empty array, but instead, no content at all
        if ($result === "" && $this->client->getLastResponse()->getStatusCode() === 204) {
            $result = [];
        }

I know there is an existing PR, perhaps checking for this use case specifically? (Might not be 100% of the issue but at least is reproducible.

Will add PR to show what I mean

from php-github-api.

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.