Skip to content

Commit

Permalink
Added 451 status code exception
Browse files Browse the repository at this point in the history
Resolves: #590
  • Loading branch information
itsmemattchung committed Apr 27, 2016
1 parent 7bb022a commit a354300
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions github3/exceptions.py
Expand Up @@ -130,6 +130,11 @@ class ServerError(ResponseError):
pass


class UnavailableForLegalReasons(ResponseError):
"""Exception class for 451 responses."""
pass


error_classes = {
400: BadRequest,
401: AuthenticationFailed,
Expand All @@ -138,6 +143,7 @@ class ServerError(ResponseError):
405: MethodNotAllowed,
406: NotAcceptable,
422: UnprocessableEntity,
451: UnavailableForLegalReasons,
}


Expand Down

0 comments on commit a354300

Please sign in to comment.