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

Wrong error on unique constraint violation #128

Open
mitom opened this issue Aug 19, 2015 · 1 comment
Open

Wrong error on unique constraint violation #128

mitom opened this issue Aug 19, 2015 · 1 comment

Comments

@mitom
Copy link

mitom commented Aug 19, 2015

If a unique constraint is violated an OrientDB.RequestError is thrown instead of WLValidationError as I'd expect. Actually it wouldn't have to be WLValidationError, but currently the error is of code E_UNKNOWN and that should be E_VALIDATION.

Error (E_UNKNOWN) :: Encountered an unexpected error
OrientDB.RequestError: Cannot index record user{******}: found duplicated key '*****@gmail.com' in index 'user.email' previously assigned to the record #15:2
@mitom mitom mentioned this issue Aug 19, 2015
@dmarcelino
Copy link
Member

Thanks @mitom, we need to improve error handling in sails-orientdb.

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

No branches or pull requests

2 participants