Fix
This commit is contained in:
@@ -58,7 +58,7 @@ const mapErrors = <A, E, R>(effect: Effect.Effect<A, E, R>) =>
|
||||
Empty: cause => Effect.fail(
|
||||
new TRPCError({
|
||||
code: "INTERNAL_SERVER_ERROR",
|
||||
cause: new TRCPErrorCause(cause),
|
||||
cause: new TRPCErrorCause(cause),
|
||||
})
|
||||
),
|
||||
|
||||
@@ -67,7 +67,7 @@ const mapErrors = <A, E, R>(effect: Effect.Effect<A, E, R>) =>
|
||||
? cause.error
|
||||
: new TRPCError({
|
||||
code: "INTERNAL_SERVER_ERROR",
|
||||
cause: new TRCPErrorCause(cause),
|
||||
cause: new TRPCErrorCause(cause),
|
||||
})
|
||||
),
|
||||
|
||||
@@ -76,35 +76,34 @@ const mapErrors = <A, E, R>(effect: Effect.Effect<A, E, R>) =>
|
||||
? 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<E> extends Error {
|
||||
export class TRPCErrorCause<E> extends Error {
|
||||
constructor(readonly cause: Cause.Cause<E>) {
|
||||
super()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user