fOfer
fOfer
Explore posts from servers
HHono
Created by fOfer on 7/5/2024 in #help
zValidator not coercing types correctly
Thanks a lot
10 replies
HHono
Created by fOfer on 7/5/2024 in #help
zValidator not coercing types correctly
Is there a way to get the correct types without having to extract the zod schema?
10 replies
HHono
Created by fOfer on 7/5/2024 in #help
zValidator not coercing types correctly
When I coerce the query to a number, Hono infers the type as Record<string, string>
10 replies
HHono
Created by igmtink on 5/21/2024 in #help
How to handle multiple errors in (react query) using (hono rpc)?
Or create a typesafe function that receives the $get or $post return and apply that validation without loosing typesafety
13 replies
HHono
Created by igmtink on 5/21/2024 in #help
How to handle multiple errors in (react query) using (hono rpc)?
Would love to set this at the hc client level
13 replies
HHono
Created by igmtink on 5/21/2024 in #help
How to handle multiple errors in (react query) using (hono rpc)?
async (res) => {
switch (res.status) {
case 500:
throw new errors.ParseError(await res.text())
case 200:
return res.json()
case 404:
default:
throw new errors.NotFoundError(await res.text())
}
}
async (res) => {
switch (res.status) {
case 500:
throw new errors.ParseError(await res.text())
case 200:
return res.json()
case 404:
default:
throw new errors.NotFoundError(await res.text())
}
}
13 replies
HHono
Created by igmtink on 5/21/2024 in #help
How to handle multiple errors in (react query) using (hono rpc)?
I myself had to do this in my useQuery instances on the client side
13 replies
HHono
Created by igmtink on 5/21/2024 in #help
How to handle multiple errors in (react query) using (hono rpc)?
Curious about this
13 replies