From 3ae5f31f964d576c7a0b74b787cc73e7aa078cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Mon, 15 Jul 2024 02:22:40 +0200 Subject: [PATCH] Fix --- packages/server/src/trpc/TRPCContextCreator.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/server/src/trpc/TRPCContextCreator.ts b/packages/server/src/trpc/TRPCContextCreator.ts index daa8c06..467a96e 100644 --- a/packages/server/src/trpc/TRPCContextCreator.ts +++ b/packages/server/src/trpc/TRPCContextCreator.ts @@ -58,7 +58,7 @@ const mapErrors = (effect: Effect.Effect) => Empty: cause => Effect.fail( new TRPCError({ code: "INTERNAL_SERVER_ERROR", - cause: new TRCPErrorCause(cause), + cause: new TRPCErrorCause(cause), }) ), @@ -67,7 +67,7 @@ const mapErrors = (effect: Effect.Effect) => ? cause.error : new TRPCError({ code: "INTERNAL_SERVER_ERROR", - cause: new TRCPErrorCause(cause), + cause: new TRPCErrorCause(cause), }) ), @@ -76,35 +76,34 @@ const mapErrors = (effect: Effect.Effect) => ? cause.defect : new TRPCError({ code: "INTERNAL_SERVER_ERROR", - cause: new TRCPErrorCause(cause), + cause: new TRPCErrorCause(cause), }) ), Interrupt: cause => Effect.fail( new TRPCError({ code: "INTERNAL_SERVER_ERROR", - cause: new TRCPErrorCause(cause), + cause: new TRPCErrorCause(cause), }) ), Sequential: cause => Effect.fail( new TRPCError({ code: "INTERNAL_SERVER_ERROR", - cause: new TRCPErrorCause(cause), + cause: new TRPCErrorCause(cause), }) ), Parallel: cause => Effect.fail( new TRPCError({ code: "INTERNAL_SERVER_ERROR", - cause: new TRCPErrorCause(cause), + cause: new TRPCErrorCause(cause), }) ), }) ) - -export class TRCPErrorCause extends Error { +export class TRPCErrorCause extends Error { constructor(readonly cause: Cause.Cause) { super() }