8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bb022a commit a354300Copy full SHA for a354300
github3/exceptions.py
@@ -130,6 +130,11 @@ class ServerError(ResponseError):
130
pass
131
132
133
+class UnavailableForLegalReasons(ResponseError):
134
+ """Exception class for 451 responses."""
135
+ pass
136
+
137
138
error_classes = {
139
400: BadRequest,
140
401: AuthenticationFailed,
@@ -138,6 +143,7 @@ class ServerError(ResponseError):
143
405: MethodNotAllowed,
144
406: NotAcceptable,
145
422: UnprocessableEntity,
146
+ 451: UnavailableForLegalReasons,
141
147
}
142
148
149
0 commit comments