ronan(wighawag)
Explore posts from serversany option to have $post ignore json when we provide body via init: {body.. ?
technically
{json: execution}
is pointless since I provide the body content manually via {init:{body: jsonAsString}}
anyway to make hono ignore the json when providing body this way ?1 replies
any way to have different .notFound depending on parent path ?
I have 2 main path:
api
dashboard
I would like anything path under api/.... that do not exit to return a json object
but anything under dashboard/... to return a web page for not found
is that possible and how ?
2 replies
adding generic error output type to App type
Hey all, I am using the typed RPC feature of hono and got it working, except for the errors
I have an .onError that consstruct a json from error thrown and I would like that error type to be unioned with each of the output type of all path
Is there a way to do this ?
Like is there some type generic magic I could add to my exported App type to add an extra type for all outputs
Something like
export type App = AddErrorType<typeof app, {success: false, errors: {message: string, code: number}[]}>
?5 replies