mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-24 17:03:55 +10:00
add error logging on server only
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { onError } from "@orpc/server";
|
||||
import { RPCHandler } from "@orpc/server/fetch";
|
||||
import { BatchHandlerPlugin, RequestHeadersPlugin } from "@orpc/server/plugins";
|
||||
import { createFileRoute } from "@tanstack/react-router";
|
||||
@@ -5,11 +6,11 @@ import router from "@/integrations/orpc/router";
|
||||
import { getLocale } from "@/utils/locale";
|
||||
|
||||
const rpcHandler = new RPCHandler(router, {
|
||||
// interceptors: [
|
||||
// onError((error) => {
|
||||
// console.error(error);
|
||||
// }),
|
||||
// ],
|
||||
interceptors: [
|
||||
onError((error) => {
|
||||
console.error(`ERROR [oRPC]: ${error}`);
|
||||
}),
|
||||
],
|
||||
plugins: [new BatchHandlerPlugin(), new RequestHeadersPlugin()],
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user