Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3eaf07c

Browse files
slivercn2ygk
andauthored
Document setting JSON_API_UNIFORM_EXCEPTIONS (#813)
Fixes #326 Extracted from #437 Co-authored-by: Alan Crosswell <alan@columbia.edu>
1 parent 42173db commit 3eaf07c

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)

AltStyle によって変換されたページ (->オリジナル) /