Catching Multiple Constraint Error

In my current code, i tried to catch errors thrown by Libsql.

try {
        await db.update(student).set(form.data).where(eq(student.id, form.data.id));
    } catch (error) {
        console.error(error);
        // do something with the error here
    }


However only one error will get catch at a time. Let's say the id and email is both unique, only email will get catch. Is this Sqlite or Drizzle or Turso default behavior? Is there some sort of error "bag" included or maybe outside library that can help?
Was this page helpful?