Skip to content

Commit 5ad2c90

Browse files
committed
Document setting JSON_API_UNIFORM_EXCEPTIONS
Fixes #326 Extracted from #437
1 parent 03f7e7e commit 5ad2c90

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/usage.md

Lines changed: 7 additions & 0 deletions
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)