Closed Joshua-Anderson closed 8 years ago
That's how django rest framework renders errors. A field can fail multiple validations, so it returns an array which contains each validation error that failed for that field.
@bacongobbler It's not the format... it's the auto-generated validation error message: Key with this public already exists.
Those we can customise - Just needs to be done in the Model schema definition. We should probably take a look at all the definitions and change accordingly.
By default DRF / Django will do a {ModelName} bla bla {fieldname} bla bla
where {ModelName}
will have s
appended if it is a plural. Somewhat out own fault for naming things the way we did as sometimes it doesn't lend it self to nice auto-generated messages :)
The error message for adding a key that already exists is odd.