Skip to content

Commit

Permalink
Merge pull request #9 from vladutjs/fix/errors-serialisation
Browse files Browse the repository at this point in the history
Fix trpc errors deserialization
  • Loading branch information
janek26 authored Dec 13, 2023
2 parents 6936dc9 + 89be189 commit dd4ee08
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/link/internal/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ export const createBaseLink = <TRouter extends AnyRouter>(
if (id !== trpc.id) return;

if ('error' in trpc) {
const error = runtime.transformer.deserialize(trpc.error);
observer.error(TRPCClientError.from({ ...trpc, error }));
observer.error(TRPCClientError.from(trpc));
return;
}

Expand Down

0 comments on commit dd4ee08

Please sign in to comment.