Skip to content

Commit

Permalink
Fix propagating cause in response serialization error (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmuharemagic authored Oct 31, 2024
1 parent 55543cb commit 0ce0f23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/validationError.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createError } from '@fastify/error';
import {} from 'fastify';
import type { FastifySchemaValidationError } from 'fastify/types/schema';
import type { ZodError, ZodIssue, ZodIssueCode } from 'zod';

Expand Down Expand Up @@ -32,6 +31,7 @@ export class ResponseSerializationError extends createError(
public url: string,
options: { cause: ZodError },
) {
super(options);
super();
this.cause = options.cause;
}
}

0 comments on commit 0ce0f23

Please sign in to comment.