mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
wip: refresh design
This commit is contained in:
7
packages/trpc/client/guards.ts
Normal file
7
packages/trpc/client/guards.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { TRPCClientError } from '@trpc/client';
|
||||
|
||||
import { AppRouter } from '../server/router';
|
||||
|
||||
export const isTRPCBadRequestError = (err: unknown): err is TRPCClientError<AppRouter> => {
|
||||
return err instanceof TRPCClientError && err.shape?.code === 'BAD_REQUEST';
|
||||
};
|
||||
Reference in New Issue
Block a user