Git Product home page Git Product logo

Comments (8)

j0k3r avatar j0k3r commented on June 5, 2024 2

Should be fixed in next release.
Thanks for reporting @IvorNL and for the data to fix the bug @peter279k.

from php-imgur-api-client.

peter279k avatar peter279k commented on June 5, 2024 1

@j0k3r , my error response JSON is as follows:

array(3) {
  'data' =>
  array(3) {
    'error' =>
    array(4) {
      'code' =>
      int(429)
      'message' =>
      string(56) "You are uploading too fast. Please wait 59 more minutes."
      'type' =>
      string(14) "ImgurException"
      'exception' =>
      array(0) {
        ...
      }
    }
    'request' =>
    string(13) "/3/image.json"
    'method' =>
    string(4) "POST"
  }
  'success' =>
  bool(false)
  'status' =>
  int(400)
}

from php-imgur-api-client.

j0k3r avatar j0k3r commented on June 5, 2024

What could be an option for you?
Creating a custom exception for the uploading too fast?

from php-imgur-api-client.

IvorNL avatar IvorNL commented on June 5, 2024

Yes, that would be best (i now had to debug the code to find out the exact error)

from php-imgur-api-client.

reminazarian avatar reminazarian commented on June 5, 2024

When response is 429, $responseData['data']['error'] is an array and line 74 produces Notice: Array to string conversion.

from php-imgur-api-client.

peter279k avatar peter279k commented on June 5, 2024

It looks like the $responseData['data']['error'] will be the array when response is 429.

Perhaps we have to create the condition for response 429 and try to convert the array to string before merging strings.

from php-imgur-api-client.

j0k3r avatar j0k3r commented on June 5, 2024

If someone can dump the $responseData and provide it here when response is 429 I'll implement a fix

from php-imgur-api-client.

peter279k avatar peter279k commented on June 5, 2024

Here is the formatted JSON response:

{
    "data": {
        "error": {
            "code": 429,
            "message": "You are uploading too fast. Please wait 57 more minutes.",
            "type": "ImgurException",
            "exception": []
        },
        "request": "\/3\/image.json",
        "method": "POST"
    },
    "success": false,
    "status": 400
}

from php-imgur-api-client.

Related Issues (17)

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.