You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I register a path, where body schema is z.never() or contains a nested attribute that is z.never, the following exception is thrown:
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<UnknownZodTypeError>".] {
code: 'ERR_UNHANDLED_REJECTION'
}
Here is an example that causes the exception:
registry.registerPath({// registry: OpenAPIRegistrymethod: 'put',path: '/todos/{id}',request: {params: verifyIdSchema,body: {content: {'application/json': {schema: z.object({x: z.never()})// same if z.never() is deeply nested in the schema object}}}},responses: {}})
Same if I use z.undefined() as well
Is this a bug or am I missing something?
The text was updated successfully, but these errors were encountered:
When I register a path, where body schema is
z.never()
or contains a nested attribute that isz.never
, the following exception is thrown:Here is an example that causes the exception:
Same if I use
z.undefined()
as wellIs this a bug or am I missing something?
The text was updated successfully, but these errors were encountered: