Closed
Description
Even if a Serializer field is using UniqueValidator
(likewise for UniqueTogetherValidator
) there is still a race where after the check is performed, a conflicting row may be added to the DB. Right now that results in a 500 error with something like the following:
Exception Type: IntegrityError at /api/xxx/
Exception Value: UNIQUE constraint failed: ...
I suggest in these cases DFF return a 409
with a generic error message. At the very least there should be some opt in behavior to get this.
I do think this logic should be handled by the framework rather than by the application.
Metadata
Metadata
Assignees
Labels
No labels