Errors
The tRPC error envelope and the status codes you'll see
Errors follow the standard tRPC envelope. Over HTTPS, the response carries an error object and an appropriate HTTP status code derived from the tRPC error code:
Check error.json.data.code (or the HTTP status) to branch on the error; code is the tRPC numeric code and isn’t meant for application logic.
Status codes
Each procedure in the API reference lists the specific errors it can return.

