Skip to content

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Feb 21, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets #35762 (comment)
License MIT
Doc PR N/A

In order to help when debugging incorrect JSON responses, this PR adds the requested URL to the error message.

Before: Syntax Error
After: Syntax error, for "https://example.com/file.json".

See the 2nd commit for full diff in new unit tests

@carsonbot carsonbot added Status: Needs Review HttpClient DX DX = Developer eXperience (anything that improves the experience of using Symfony) Bug labels Feb 21, 2020
@GromNaN GromNaN force-pushed the http-client-json-exception branch from 6b7c0cf to 2f61d87 Compare February 21, 2020 22:54
@chalasr chalasr added this to the 4.4 milestone Feb 23, 2020
@nicolas-grekas
Copy link
Member

I saw that you asked for this on Slack: improving the message of an exception is ... an improvement :) As such, this should target master.

@nicolas-grekas nicolas-grekas modified the milestones: 4.4, next Feb 23, 2020
@nicolas-grekas nicolas-grekas force-pushed the http-client-json-exception branch from 2f61d87 to 0653917 Compare February 25, 2020 13:55
@nicolas-grekas
Copy link
Member

Thank you @GromNaN.

@nicolas-grekas nicolas-grekas merged commit cad3f10 into symfony:4.4 Feb 25, 2020
@GromNaN
Copy link
Member Author

GromNaN commented Feb 25, 2020

Thank you @nicolas-grekas for finishing the job.

@GromNaN GromNaN deleted the http-client-json-exception branch February 25, 2020 20:40
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.1 May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug DX DX = Developer eXperience (anything that improves the experience of using Symfony) HttpClient Status: Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants