Skip to content

Commit 02e441f

Browse files
committed
elif
1 parent b277dd6 commit 02e441f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

wls_rest_python.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,26 +202,26 @@ def _handle_error(response):
202202
if response.status_code == 400:
203203
exception_type = BadRequestException
204204

205-
if response.status_code == 401:
205+
elif response.status_code == 401:
206206
# does not return json
207207
raise UnauthorizedException()
208208

209-
if response.status_code == 403:
209+
elif response.status_code == 403:
210210
exception_type = ForbiddenException
211211

212-
if response.status_code == 404:
212+
elif response.status_code == 404:
213213
exception_type = NotFoundException
214214

215-
if response.status_code == 405:
215+
elif response.status_code == 405:
216216
exception_type = MethodNotAllowedException
217217

218-
if response.status_code == 406:
218+
elif response.status_code == 406:
219219
exception_type = NotAcceptableException
220220

221-
if response.status_code == 500:
221+
elif response.status_code == 500:
222222
exception_type = ServerErrorException
223223

224-
if response.status_code == 503:
224+
elif response.status_code == 503:
225225
exception_type = ServiceUnavailableException
226226

227227
try:

0 commit comments

Comments
 (0)