Giter Site home page Giter Site logo

Comments (11)

aaronklaassen avatar aaronklaassen commented on May 17, 2024

@taduuda What's the http response code you get with your "edit no 2" code? It's 200 OK, right?

from unsplash-php.

cetteup avatar cetteup commented on May 17, 2024

@aaronklaassen Yes. Test ran 871 times today, got 200 and 30/30 photos every single time.

from unsplash-php.

cetteup avatar cetteup commented on May 17, 2024

I've written a custom wrapper that adds the HTTP status code to every exception. Getting some 403s and 500s.

2017-01-17 12:40:08.933  :  Error caller: functions at line 1189
2017-01-17 12:40:08.933  :  Error class: Diza\Unsplash\Exception
2017-01-17 12:40:08.933  :  Error message:  [500 Internal Server Error]
2017-01-17 12:40:08.933  :  In: /path/php/vendor/diza/unsplash/src/HttpClient.php(401)
2017-01-17 12:40:08.933  :  Stack trace:
2017-01-17 12:40:08.933  :  #0 /path/php/vendor/diza/unsplash/src/HttpClient.php(91): Diza\Unsplash\HttpClient->send_request('GET', 'users/zimsurfa/...', Array)
2017-01-17 12:40:08.933  :  #1 /path/php/functions.php(1183): Diza\Unsplash\HttpClient->user_likes('zimsurfa', 1, 25)
2017-01-17 12:40:08.933  :  #2 /path/php/get-liked.php(154): getUnsplashTotal('liked', 25, 'zimsurfa')
2017-01-17 12:40:08.933  :  #3 {main}
2017-01-17 13:25:01.936  :  Error caller: functions at line 1216
2017-01-17 13:25:01.936  :  Error class: Diza\Unsplash\Exception
2017-01-17 13:25:01.936  :  Error message:  [403 Forbidden]
2017-01-17 13:25:01.936  :  In: /path/php/vendor/diza/unsplash/src/HttpClient.php(401)
2017-01-17 13:25:01.936  :  Stack trace:
2017-01-17 13:25:01.936  :  #0 /path/php/vendor/diza/unsplash/src/HttpClient.php(91): Diza\Unsplash\HttpClient->send_request('GET', 'users/masterstr...', Array)
2017-01-17 13:25:01.936  :  #1 /path/php/functions.php(1211): Diza\Unsplash\HttpClient->user_likes('masterstrike', 26, 25, 'oldest')
2017-01-17 13:25:01.936  :  #2 /path/php/get-liked.php(209): getUnsplashPhotoInfo('liked', 26, 25, 'oldest', 'masterstrike')
2017-01-17 13:25:01.936  :  #3 {main}

from unsplash-php.

aaronklaassen avatar aaronklaassen commented on May 17, 2024

Do you know if those 403's Rate Limit Exceeded?

from unsplash-php.

cetteup avatar cetteup commented on May 17, 2024

I don't know if they are. Wouldn't that be in the error messages though?
I do know that all my applications are well within their rate limits. Is it at all possible that this issue is related to the incorrect rate limit return values? That would at least explain the 400's.

from unsplash-php.

aaronklaassen avatar aaronklaassen commented on May 17, 2024

@taduuda Yeah that's what I'm wondering.

Regardless though you're right: this is a bug; you should be getting an error message.

from unsplash-php.

cetteup avatar cetteup commented on May 17, 2024

Getting the error messages to work might reveal the source of the problem. Let me know if you find anything or need any further info.

from unsplash-php.

cetteup avatar cetteup commented on May 17, 2024

Any news on this? I'm still getting some 503s on two different servers.

from unsplash-php.

lukechesser avatar lukechesser commented on May 17, 2024

@taduuda @aaronklaassen any way to know if these are non-JSON responses being returned by the API?

Fastly sits between our API and can return HTML 503 responses on rare occasions where the backend times out. Our configuration is supposed to be such that a response should always occur, whether it's a timeout 500 JSON response from the API or the actual response, before Fastly's timeout can kick in, but I wouldn't say it's impossible for a 503 HTML response from Fastly

from unsplash-php.

fbstim avatar fbstim commented on May 17, 2024

Just found this issue-- I've been using the API for the first time today, and it worked fine in the morning, but after lunch has been failing to find a (public) collection and throwing a 403 error with [] as the error message. I am pretty sure I'm not exceeding the rate limit since I'm just submitting requests by hand for testing.

from unsplash-php.

lukechesser avatar lukechesser commented on May 17, 2024

@fbstim hmm, the previous 403 errors that @taduuda was getting were solved. Want to shoot us an email at [email protected]?

from unsplash-php.

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.