Skip to content

[HttpClient] Allow yielding Exception from MockResponse's $body to mock transport errors #44568

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

Merged
merged 1 commit into from
Dec 18, 2021

Conversation

fancyweb
Copy link
Contributor

Q A
Branch? 6.1
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR -

A minor DX feature to allow simulating error chunks more easily (instead of being forced to throw from a \Generator).

@carsonbot carsonbot added this to the 6.1 milestone Dec 11, 2021
@fancyweb fancyweb force-pushed the http-client/mock-response-exception branch 2 times, most recently from a7092dd to 13d234c Compare December 11, 2021 14:27
@fancyweb fancyweb force-pushed the http-client/mock-response-exception branch from 13d234c to bbfe9d8 Compare December 11, 2021 15:30
@fancyweb fancyweb changed the title [HttpClient] Allow passing an exception directly in the MockResponse body [HttpClient] Allow yielding Exception from MockResponse's $body to mock transport errors Dec 11, 2021
@fancyweb fancyweb merged commit 0f03f94 into symfony:6.1 Dec 18, 2021
@fancyweb fancyweb deleted the http-client/mock-response-exception branch December 18, 2021 13:00
@fabpot fabpot mentioned this pull request Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants