openapi-fetch version
Latest
Description
The context is this code:
|
return response.ok ? { data: undefined, response } : { error: undefined, response }; |
I wonder if we shouldn't have a tru-ish value (maybe just "true") for error here, so that the calling code can simply use if (error). What do you think?
Reproduction
The problem happens when a server returns an error status (such as 405) without any content.
Expected result
The caller can do if (error) simply.
Extra