File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,13 @@ class ApiException(OpenApiException):
140140 if http_resp.status == 404:
141141 raise NotFoundException(http_resp=http_resp, body=body, data=data)
142142
143+ # Added new conditions for 409 and 422
144+ if http_resp.status == 409:
145+ raise ConflictException(http_resp=http_resp, body=body, data=data)
146+
147+ if http_resp.status == 422:
148+ raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data)
149+
143150 if 500 <= http_resp.status <= 599:
144151 raise ServiceException(http_resp=http_resp, body=body, data=data)
145152 raise ApiException(http_resp=http_resp, body=body, data=data)
@@ -178,6 +185,16 @@ class ServiceException(ApiException):
178185 pass
179186
180187
188+ class ConflictException(ApiException):
189+ """Exception for HTTP 409 Conflict."""
190+ pass
191+
192+
193+ class UnprocessableEntityException(ApiException):
194+ """Exception for HTTP 422 Unprocessable Entity."""
195+ pass
196+
197+
181198def render_path(path_to_item):
182199 """Returns a string representation of a path"""
183200 result = ""
You can’t perform that action at this time.
0 commit comments