Skip to content

How can we check if the error is an ZodError? #2415

Answered by FoodlyEric
andredewaard asked this question in Q&A
Discussion options

You must be logged in to vote

import {ZodError} from 'zod'

error instanceof ZodError

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@FoodlyEric
Comment options

Answer selected by JacobWeisenburger
@MikeDabrowski
Comment options

@Depender-Sethi
Comment options

@xieyuheng
Comment options

@xieyuheng
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants