Error HandlingHow to intercept, handle or log errors inside oRPCimport { ORPCError, os } from '@orpc/server' const ping = os .use(async (input, context, meta) => { try { const result = await meta.next({}) const _output = result.output // do something on success return result } catch (e) { // do something on error throw e } finally { // do something on finish } }) .func((input, context, meta) => { throw new ORPCError({ code: 'NOT_FOUND', message: 'Not found', status: 404, // Optional: custom default behavior data: { something: 'include in the body and send to the client' } // pass data to the client }) })Edit on GitHubPreviousCallerNextData types