Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe approach of error handling #307

Open
vasilii-kovalev opened this issue Nov 10, 2024 · 0 comments
Open

Describe approach of error handling #307

vasilii-kovalev opened this issue Nov 10, 2024 · 0 comments

Comments

@vasilii-kovalev
Copy link

Currently, the documentation doesn't state any approach of how to handle errors.

Topics to cover:

  1. What is the format of errors? Do they have different types (extensions of Error object)? Do they have unique error codes, like Prisma does?
  2. Does a model have built-in validators depending on provided meta-data (like type)? Can users define custom validators? Can they customize errors? If so, can they customize only error messages, or they can return a custom structure? Or should they validate data passed to the model beforehand (using Zod, for example), because the library's scope will be intentionally small?
  3. Is there a difference of handling validation errors (via a dedicated validate method, for example) and other errors? Or are they all handled the same way, like in Prisma?

Even though the library will be rewritten, as mentioned in #285, this information will still be necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant