Skip to content

Commit c82e90e

Browse files
Merge pull request sigmavirus24#718 from janpriessnitz/fix_err_409
Added exception for HTTP 409 error
2 parents b58ff53 + 5254bfe commit c82e90e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

github3/exceptions.py

+11
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,16 @@ class NotAcceptable(ResponseError):
115115
pass
116116

117117

118+
class Conflict(ResponseError):
119+
"""Exception class for 409 responses.
120+
121+
Possible reasons:
122+
123+
- Head branch was modified (SHA sums do not match)
124+
"""
125+
pass
126+
127+
118128
class UnprocessableEntity(ResponseError):
119129
"""Exception class for 422 responses."""
120130
pass
@@ -142,6 +152,7 @@ class UnavailableForLegalReasons(ResponseError):
142152
404: NotFoundError,
143153
405: MethodNotAllowed,
144154
406: NotAcceptable,
155+
409: Conflict,
145156
422: UnprocessableEntity,
146157
451: UnavailableForLegalReasons,
147158
}

0 commit comments

Comments
 (0)