-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Async functionality #89
Comments
Currently the 1st "basic usage" example works fully, but if it's forced to decode JSON with a syntax error the promise rejection is eaten up silently... investigating next. |
This is harder than I thought it would be. |
The entire codebase is greatly improved and tidy now, with more type safety, but this issue still remains as the only known bug. Fetch/src/Response/BodyResponse.php Lines 113 to 131 in 144cedb
This is where the issue lies, in the resolution of the JSON data. If the JSON data is invalid, like it is when used in It's actually not a breaking issue, because it only represents internal failures (things like curl exceptions, timeouts or when $response->ok fails, are all still caught correctly). It might make sense to release the code in its currently improved state, then track this issue in a separate issue to return to later. |
* wip: phpgt/promise implementation for #89 * wip: refactor to gt promise model still need to handle rejection exceptions * feature: add badly formed json for testing * ci: update workflows * build: update dependencies * docs: update example to match new functionality * wip: sign off Http class * wip: use master branch of async * wip: fix existing tests * feature: implement proper blob response type * wip: tidy request resolver * wip: tidy curl opt builder * wip: tidy http class * stan: improve static analysis over core classes * test: improve types for native curl handle * stan: remove unused import * wip: document BodyResponse internal rejection * wip: remove alternative method of throwing internal exception * docs: update examples
PHP.Gt/Async and PHP.Gt/Promise will reduce the dependency complexity.
The text was updated successfully, but these errors were encountered: