-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Receiving a HTTP 500 when trying to save a duplicated value on an indexed unique field #4542
Comments
Parse Server allows you to create indexes but not unique indexes. Can you post some sample code? |
Hi @dplewis, About the code sample:
I know creating unique indexes can not be done through the Parse Server api, I know since this is not currently supported by Parse Server, this could not be considered as an issue, Thank you for attending this issue! |
@elios264 Thanks for the quick response. I don't see why we couldn't add unique indexes as a feature of Parse in the future. But for now I can put together a pull request for this. |
Issue Description
Parse-Server responds with a HTTP 500 when trying to save a duplicate value on an indexed unique column.
Steps to reproduce
1.- Setup a new parse-server instance and add a field of the type
String
to the table.2.- Create a unique index on that field
3.- Try to save 2 records with the same value for the indexed field.
Expected Results
The server should return a
Parse.Error.DUPLICATE_VALUE
, error codeActual Outcome
The server responds with a HTTP 500:
Environment Setup
Server
Database
Logs/Trace
This was working as expected before, I tried going back to older parse-server versions but even so, keeps happening.
The text was updated successfully, but these errors were encountered: