add error logging on server only

This commit is contained in:
Amruth Pillai
2026-02-08 01:16:38 +01:00
parent 5bdc6de862
commit 0a609306a6
3 changed files with 13 additions and 22 deletions
+1 -12
View File
@@ -11,11 +11,6 @@ import { getLocale } from "@/utils/locale";
export const getORPCClient = createIsomorphicFn()
.server((): RouterClient<typeof router> => {
return createRouterClient(router, {
// interceptors: [
// onError((error) => {
// console.error(error);
// }),
// ],
context: async () => {
const locale = await getLocale();
const reqHeaders = getRequestHeaders();
@@ -30,16 +25,10 @@ export const getORPCClient = createIsomorphicFn()
.client((): RouterClient<typeof router> => {
const link = new RPCLink({
url: `${window.location.origin}/api/rpc`,
plugins: [new BatchLinkPlugin({ groups: [{ condition: () => true, context: {} }] })],
fetch: (request, init) => {
return fetch(request, { ...init, credentials: "include" });
},
// interceptors: [
// onError((error) => {
// if (error instanceof DOMException) return;
// console.error(error);
// }),
// ],
plugins: [new BatchLinkPlugin({ groups: [{ condition: () => true, context: {} }] })],
});
return createORPCClient(link);