Skip to content

Commit 3eaf07c

Browse files
slivercn2ygk
andauthored
Document setting JSON_API_UNIFORM_EXCEPTIONS (#813)
Fixes #326 Extracted from #437 Co-authored-by: Alan Crosswell <[email protected]>
1 parent 42173db commit 3eaf07c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/usage.md

+7
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,13 @@ class MyViewset(ModelViewSet):
237237

238238
```
239239

240+
### Exception handling
241+
242+
For the `exception_handler` class, if the optional `JSON_API_UNIFORM_EXCEPTIONS` is set to True,
243+
all exceptions will respond with the JSON API [error format](http://jsonapi.org/format/#error-objects).
244+
245+
When `JSON_API_UNIFORM_EXCEPTIONS` is False (the default), non-JSON API views will respond
246+
with the normal DRF error format.
240247

241248
### Performance Testing
242249

0 commit comments

Comments
 (0)