Skip to content

Commit af0ea8e

Browse files
committed
Merge pull request #3771 from robromano/master
Add HTTP status code 451 to status.py
2 parents 2d27d9a + c8915c0 commit af0ea8e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

docs/api-guide/status-codes.md

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ The 4xx class of status code is intended for cases in which the client seems to
8989
HTTP_428_PRECONDITION_REQUIRED
9090
HTTP_429_TOO_MANY_REQUESTS
9191
HTTP_431_REQUEST_HEADER_FIELDS_TOO_LARGE
92+
HTTP_451_UNAVAILABLE_FOR_LEGAL_REASONS
9293

9394
## Server Error - 5xx
9495

rest_framework/status.py

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def is_server_error(code):
6565
HTTP_428_PRECONDITION_REQUIRED = 428
6666
HTTP_429_TOO_MANY_REQUESTS = 429
6767
HTTP_431_REQUEST_HEADER_FIELDS_TOO_LARGE = 431
68+
HTTP_451_UNAVAILABLE_FOR_LEGAL_REASONS = 451
6869
HTTP_500_INTERNAL_SERVER_ERROR = 500
6970
HTTP_501_NOT_IMPLEMENTED = 501
7071
HTTP_502_BAD_GATEWAY = 502

0 commit comments

Comments
 (0)