Set up
npm i pagerlessimport { pagerlessTrpcOnError } from "pagerless/trpc";
// in your adapter options
onError: pagerlessTrpcOnError,Keep your own handler too: onError: trpcOnError(yourHandler).
What it catches
- Procedures that fail with INTERNAL_SERVER_ERROR.
- Reports 5xx and crashes only, never 4xx, and leaves the response, logs and error exactly as they were.
Questions
Will a validation error page me?
No. Only INTERNAL_SERVER_ERROR is reported.