Skip to content

Better understandable errors #3254

@benllshua

Description

@benllshua

Let's take this simple example:

just put this anywhere in your codebase

z.string().parse(5)

this is the error you will get (as you should):

image

The default error needs to include the location of the error, line of code, and variable name... currently, I think it's really hard to locate errors without writing costume errors for everything (optional: if you don't want it to get to users we can throw an error with one message and return a simpler user-friendly error )

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions