MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / onError

Function onError

apps/api/src/app.ts:174–188  ·  view source on GitHub ↗
(ctx)

Source from the content-addressed store, hash-verified

172 router: appRouter,
173 createContext,
174 onError(ctx) {
175 if (ctx.error.code === 'UNAUTHORIZED' && ctx.path === 'organization.list') {
176 return;
177 }
178 ctx.req.log.error(
179 {
180 err: ctx.error,
181 path: ctx.path,
182 input: ctx.input,
183 type: ctx.type,
184 session: ctx.ctx?.session,
185 },
186 'trpc error',
187 );
188 },
189 } satisfies FastifyTRPCPluginOptions<AppRouter>['trpcOptions'],
190 });
191

Callers

nothing calls this directly

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected