HonoH
Hono2y ago
igmtink

What is the best way to handle the error?

What I want is to get the error from server to client using rpc + react query

  1. Using trycatch
  2. Returning c.json({ message: 'Invalid password' }, 401)
  3. Throwing HTTPException(401, { message: 'Invalid password' })
325061845-72b4e6ad-2753-479b-a251-2cd111d75a4d.png
Was this page helpful?