openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[REQ] [PHP] Add the ability to disable HTTP Errors in GuzzleHttp

Open Lexian-droid opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe.

I am using an API that uses 500 error on some endpoints, it's specified in the API spec, but Guzzle still throws an exception when using that endpoint and it responds with 500 error.

Describe the solution you'd like

I'd like to be able to disable the "Http_errors" parameter in the guzzle client, so to prevent guzzle from throwing an exception on endpoints that will use the 500 error code.

Describe alternatives you've considered

Alternatively, it would be possible to make the client disable the "Http_errors" flag upon generating, when errors may be caught.

Additional context

https://github.com/AzuraCast/AzuraCast/issues/7396 this is the discussion I've had with the developers of the API.

Lexian-droid avatar Aug 23 '24 19:08 Lexian-droid