I have an index that avoid's duplicate username. I would like it to throw specific request so I can handle it.
(Error { kind: Query, message: "failed to perform query; Database index `username_idx` already contains 'admin', with record `user:ce7psl4jqouice6j35ug`" })
Describe the solution
Set kind as DuplicateIndex(username_idx) or some other error code.
Alternative methods
Need to use string contains.
SurrealDB version
Release v1.0.0-beta.8
Contact Details
No response
Is there an existing issue for this?
[X] I have searched the existing issues
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Is your feature request related to a problem?
I have an index that avoid's duplicate username. I would like it to throw specific request so I can handle it.
Describe the solution
Set kind as
DuplicateIndex(username_idx)
or some other error code.Alternative methods
Need to use string contains.
SurrealDB version
Release v1.0.0-beta.8
Contact Details
No response
Is there an existing issue for this?
Code of Conduct