BA
Better Auth•4mo ago
Hong

additionalfield: unique - custom error

Hi guys is there any way to return custom error message from the auth.ts that is set to unique? user: { additionalFields: { employeeID: { type: 'string', required: true, unique: true, }, }, }, for now only have the status code and statustext, it got error in drizzle

code: 'SQLITE_CONSTRAINT_UNIQUE',
rawCode: 2067

code: 'SQLITE_CONSTRAINT_UNIQUE',
rawCode: 2067
No description
1 Reply
Hong
HongOP•3mo ago
any update on this? 🥲

Did you find this page helpful?