A single c.body()
return in a handler overrides all other returns
#3798
Labels
c.body()
return in a handler overrides all other returns
#3798
What version of Hono are you using?
4.5.5
What runtime/platform is your app running on? (with version if possible)
Bun 1.1.38
What steps can reproduce the bug?
Why use
body
in the first place? Because 204 is aContentlessStatusCode
andc.text
orc.json
no longer accept this as a valid status code.What is the expected behavior?
The return type of
app.hello.$get()
should bePromise<ClientResponse<'You cannot use this winter', 400, 'text'> | ClientResponse<'You cannot use this summer', 400, 'text'> | ClientResponse<null, 204, string>>
What do you see instead?
The return type of
app.hello.$get()
is actuallyPromise<ClientResponse<{}, StatusCode, string>>
Additional information
No response
The text was updated successfully, but these errors were encountered: