Skip to content

Commit 3db21e6

Browse files
chore: Merge pull request #15 from lauslim12/main
Propagate `ZodError` as `cause` for `PARSE_PATH_PARAMS`
2 parents b32acda + f204cec commit 3db21e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/path-params.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ export default function parsePathParams<I, O>(source?: I, schema?: ZodType<O, Zo
1111
// eslint-disable-next-line no-console
1212
console.log((error as ZodError).issues);
1313
}
14-
throw new Error("PARSE_PATH_PARAMS");
14+
throw new Error("PARSE_PATH_PARAMS", { cause: (error as ZodError).issues });
1515
}
1616
}

0 commit comments

Comments
 (0)