For interoperability with EmberData it seems I need to reply with 422 (Unprocessable Entity
) instead of 400 (Bad Request
) whenever validation errors occur. I have two questions:
- How can I specify the response status code when using a ModelViewSet?
- Why is the 422 not listed in the list of possible return codes?
And bonus:
- Why is EmberData expecting 422? This is not part of the JSONAPi spec, as far as I can see.
Aucun commentaire:
Enregistrer un commentaire