Code Monkey home page Code Monkey logo

Comments (12)

mtdowling avatar mtdowling commented on June 14, 2024

All the tests pass though: https://travis-ci.org/guzzle/guzzle-services

Is there something missing that needs to be covered?

from guzzle-services.

GrahamCampbell avatar GrahamCampbell commented on June 14, 2024

I'll look into it shortly.

from guzzle-services.

GrahamCampbell avatar GrahamCampbell commented on June 14, 2024

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.

GrahamCampbell avatar GrahamCampbell commented on June 14, 2024

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.

GrahamCampbell avatar GrahamCampbell commented on June 14, 2024

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.

GrahamCampbell avatar GrahamCampbell commented on June 14, 2024

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.

GrahamCampbell avatar GrahamCampbell commented on June 14, 2024

I'll try attaching the log subscriber later tonight.

from guzzle-services.

GrahamCampbell avatar GrahamCampbell commented on June 14, 2024

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.

GrahamCampbell avatar GrahamCampbell commented on June 14, 2024

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.

mtdowling avatar mtdowling commented on June 14, 2024

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.

mtdowling avatar mtdowling commented on June 14, 2024

This is now fixed and I added a test case.

from guzzle-services.

GrahamCampbell avatar GrahamCampbell commented on June 14, 2024

Great. Thanks. :)

from guzzle-services.

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.