Comments (12)
All the tests pass though: https://travis-ci.org/guzzle/guzzle-services
Is there something missing that needs to be covered?
from guzzle-services.
I'll look into it shortly.
from guzzle-services.
Ok, my first step is to be 1000% sure that this isn't caused by an issue in my code. This was confirmed by me checking it worked with guzzle 4: GrahamDeprecated/Laravel-CloudFlare-API@468e321. The results from that manual test were that, yes, everything definitely works with guzzle 4.
I then reinstalled guzzle 5, then tried disabling my 2 subscribers to make sure they weren't interfering, and they weren't - disabling them made no difference.
Third step - look for changes to the guzzle classes I'm interacting with - there are no real changes, only changes to type hints.
I'm now going through the guzzle code trying to work out at which point the response variable isn't set correctly...
from guzzle-services.
At this point: https://github.com/guzzle/guzzle-services/blob/master/src/Subscriber/ProcessResponse.php#L98, the response variable is null. What's going on there?
from guzzle-services.
Ahh. Your code comment says that this is allowed to be null if there was an http error. https://github.com/guzzle/command/blob/master/src/Event/ProcessEvent.php#L45
from guzzle-services.
But then you assumed that it was always a response object in that other subscriber. Also, I'm struggling to see how there could have been an http error?
from guzzle-services.
I'll try attaching the log subscriber later tonight.
from guzzle-services.
OH, JUST WOW!
[2014-10-24 18:10:39] cloudflare-api.CRITICAL: GRAHAM-WIN7 Guzzle/5.0.1 curl/7.36.0 PHP/5.6.0 - [2014-10-24T18:10:39+00:00] "GET /api_json.html?a=stats&tkn=349f0d06c82cf202b46fc0efa9c44cb8079cc&email=a%40starbs.net&z=grahamjcampbell.co.uk&interval=20 /" NULL NULL {"request":"[object] (GuzzleHttp\\Message\\Request: {})","response":null,"exception":"[object] (GuzzleHttp\\Exception\\RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate at C:\\Program Files (x86)\\EasyPHP-DevServer-14.1VC11\\data\\localweb\\vendor\\guzzlehttp\\guzzle\\src\\Exception\\RequestException.php:51, GuzzleHttp\\Ring\\Exception\\RingException: cURL error 60: SSL certificate problem: unable to get local issuer certificate at C:\\Program Files (x86)\\EasyPHP-DevServer-14.1VC11\\data\\localweb\\vendor\\guzzlehttp\\ringphp\\src\\Client\\CurlFactory.php:129)"} []
from guzzle-services.
Although this is due to a misconfiguration of php on my part, guzzle should still handle this error correctly, instead of just a cryptic error that took a fair bit of digging to work out what was going on.
from guzzle-services.
Seems like there just needs to be a conditional check in https://github.com/guzzle/guzzle-services/blob/master/src/Subscriber/ProcessResponse.php#L98 that ensures a response is present. Once added, the underlying HTTP exception will eventually be thrown.
from guzzle-services.
This is now fixed and I added a test case.
from guzzle-services.
Great. Thanks. :)
from guzzle-services.
Related Issues (20)
- Recommended test setup? HOT 1
- Unable to POST multipart parameters HOT 1
- Is there a way to put other models definition for list items ? HOT 1
- Raw request body data HOT 3
- What am i doing wrong ? HOT 3
- Please document how to use middleware with GuzzleClient HOT 1
- Better responseModel/responseClass feature. HOT 2
- Create request without root key HOT 1
- Support for Multiple `type` Options within Response Models
- Tests Fail with guzzlehttp/psr7 >= 1.6.0 HOT 1
- Feature Request - Ability to Bind Parameter Filters to Specific Request Stages
- What branch is under active development? HOT 2
- Feature Request: Ability to Specify "process: false" at Operation Level
- State of the project HOT 8
- guzzlehttp/guzzle dosn't work after update php to php 8 HOT 2
- Not possible to install on PHP <=7.3 HOT 2
- Why headers are not being passed ?
- Ran into composer issue because package does not auto update. HOT 5
- Extending a parameter that extends another parameter doesn't work as expected
- Add default property into response model 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 guzzle-services.