Comments (7)
@aarondfrancis I haven't been able to reproduce this error nor find anything in our logs that would indicate there's an issue with our API or wrapper regarding this issue.
I'll be closing this issue now but feel free to comment on this issue or message [email protected] if you see this problem again.
from lob-php.
I believe Guzzle has a hasResponse
method on the exception object.
http://docs.guzzlephp.org/en/stable/quickstart.html?highlight=exceptions#exceptions
from lob-php.
@aarondfrancis do you happen to have an example payload that triggers or has triggered the exception? What method were you using?
from lob-php.
Also, what version of the wrapper are you currently using?
from lob-php.
From my composer.lock:
"name": "lob/lob-php",
"version": "v2.1.1",
"source": {
"type": "git",
"url": "https://github.com/lob/lob-php.git",
"reference": "f74c6a75cac247691762580fccce8cbe264c4b37"
},
Not sure what the payload is, but if I see another one I'll grab it and post back!
from lob-php.
It seems like you shouldn't call getBody
on a getResponse
knowing that getResponse
can sometimes return null.
Even if it's a network issue, I believe the library should handle that gracefully.
Why not call hasResponse
before trying to call getBody
?
from lob-php.
Please check out this SO post: https://stackoverflow.com/a/40644585.
While the answers above are good they will not deal with network errors ...
It's better in this case to expect RequestException and check for a response.
If there are network errors, we need to ensure the application doesn't crash
from lob-php.
Related Issues (20)
- Parent class for LOB exceptions HOT 2
- Different issues related to Enums on PHP7
- Invalid type in PHPDoc block for AddressEditable::setAddressCountry
- Exception Handling Issue during International Address Verification HOT 1
- need example of inline-postcard
- Failing Example create_pdf.php
- Update Existing Address HOT 2
- Fatal error HOT 7
- Support versioning in wrapper
- Correctly catch 429s HOT 2
- [Lob\Exception\UnexpectedErrorException] An Unexpected Error has occurred. HOT 2
- Change Guzzle dependency to guzzlehttp/guzzle HOT 6
- How i can get Error Code? HOT 1
- merge_variables not allowed HOT 1
- @ symbol causing error. HOT 2
- Expose Rate Limit headers HOT 1
- Bad Method Signature HOT 3
- CURL Reset Error HOT 3
- bad error message if user account does not have scheduled mailing ability HOT 2
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 lob-php.