Skip to content

Commit 45e90c3

Browse files
authored
Merge pull request encode#4679 from browniebroke/exceptions-docs-typo
Correct a small typo in exceptions documentation
2 parents 24791cb + 0c02bbb commit 45e90c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/api-guide/exceptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Any example validation error might look like this:
4747

4848
You can implement custom exception handling by creating a handler function that converts exceptions raised in your API views into response objects. This allows you to control the style of error responses used by your API.
4949

50-
The function must take a pair of arguments, this first is the exception to be handled, and the second is a dictionary containing any extra context such as the view currently being handled. The exception handler function should either return a `Response` object, or return `None` if the exception cannot be handled. If the handler returns `None` then the exception will be re-raised and Django will return a standard HTTP 500 'server error' response.
50+
The function must take a pair of arguments, the first is the exception to be handled, and the second is a dictionary containing any extra context such as the view currently being handled. The exception handler function should either return a `Response` object, or return `None` if the exception cannot be handled. If the handler returns `None` then the exception will be re-raised and Django will return a standard HTTP 500 'server error' response.
5151

5252
For example, you might want to ensure that all error responses include the HTTP status code in the body of the response, like so:
5353

0 commit comments

Comments
 (0)