Skip to content

Commit 8b34d64

Browse files
committed
fix unhandled thrown error in error handler
1 parent f0dbd17 commit 8b34d64

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@omer-x/next-openapi-route-handler",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "a Next.js plugin to generate OpenAPI documentation from route handlers",
55
"keywords": [
66
"next.js",

src/core/zod-error-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function safeParse<T>(schema: ZodType<T>, input: Record<string, unknown>)
1414
return safeParse(schema, convertStringToNumber(input, issue.path as string[]));
1515
}
1616
}
17-
throw new Error("There are some errors left unhandled. (next-openapi-route-handler)");
17+
throw result.error;
1818
}
1919
return result.data;
2020
}

0 commit comments

Comments
 (0)