Currently, the documentation doesn't state any approach of how to handle errors.
Topics to cover:
What is the format of errors? Do they have different types (extensions of Error object)? Do they have unique error codes, like Prisma does?
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?
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.
Currently, the documentation doesn't state any approach of how to handle errors.
Topics to cover:
Error
object)? Do they have unique error codes, like Prisma does?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.