remove error-causing plugins in orpc

This commit is contained in:
Amruth Pillai
2026-02-10 01:43:11 +01:00
parent 45fc32323f
commit eb62ed99ce
2 changed files with 3 additions and 14 deletions
+2 -12
View File
@@ -1,22 +1,12 @@
import { onError } from "@orpc/server";
import { RPCHandler } from "@orpc/server/fetch";
import {
BatchHandlerPlugin,
RequestHeadersPlugin,
SimpleCsrfProtectionHandlerPlugin,
StrictGetMethodPlugin,
} from "@orpc/server/plugins";
import { BatchHandlerPlugin, RequestHeadersPlugin, StrictGetMethodPlugin } from "@orpc/server/plugins";
import { createFileRoute } from "@tanstack/react-router";
import router from "@/integrations/orpc/router";
import { getLocale } from "@/utils/locale";
const rpcHandler = new RPCHandler(router, {
plugins: [
new BatchHandlerPlugin(),
new RequestHeadersPlugin(),
new StrictGetMethodPlugin(),
new SimpleCsrfProtectionHandlerPlugin(),
],
plugins: [new BatchHandlerPlugin(), new RequestHeadersPlugin(), new StrictGetMethodPlugin()],
interceptors: [
onError((error) => {
console.error(`ERROR [oRPC]: ${error}`);