Comments (11)
@taduuda What's the http response code you get with your "edit no 2" code? It's 200 OK
, right?
from unsplash-php.
@aaronklaassen Yes. Test ran 871 times today, got 200 and 30/30 photos every single time.
from unsplash-php.
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.
Do you know if those 403's Rate Limit Exceeded
?
from unsplash-php.
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.
@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.
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.
Any news on this? I'm still getting some 503s on two different servers.
from unsplash-php.
@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.
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.
@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)
- How to find the information for the attribution HOT 2
- Issue with ArrayObject and private $parameters within Endpoint HOT 1
- Search results different from the website HOT 2
- What about query caching? HOT 4
- Is Crew\Unsplash\Photo::create($file_path) still supported? HOT 1
- Update guzzle to ^7.0 HOT 2
- Are there any plans to add a proxy option to this?
- Cannot search only within collection
- Auto update Packagist
- Deprecation warning - `Photo::all` causes a deprecation warning in PHP 8.1
- When will a PHP 8.1 release be made? HOT 4
- Exception on downloading "plus" Photo
- Script works in the browser, but fails on CRONJOB, FETCH, or RUN SCRIPT
- Bad error message when photo ID is missing HOT 1
- Error message missing HOT 5
- Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method. HOT 6
- Using only the public permission scope actions without oAuth API does not work as expected HOT 1
- Remove support for PHP versions < 7.1
- Photo类的parameters属性的权限为什么是private?这导致我调用Photo::all方法后无法取出数据 HOT 1
- Doubt in the Endpoint class HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unsplash-php.