Skip to content
Discussion options

You must be logged in to vote

This is expected behavior because procedures do not inherit errors from middleware. When you throw a defined error from middleware, oRPC attempts to validate it and sets the result to false if no corresponding error is defined in the procedure.

This was also a feature request, but after multiple attempts, I decided not to support it. oRPC middleware can become overly complicated, and I want type-safe errors to remain optional without affecting the dx at all.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@rrmesquita
Comment options

@QzCurious
Comment options

@QzCurious
Comment options

Answer selected by rrmesquita
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants