Skip to content

Commit 9ec9638

Browse files
committed
IDEV-2013: Update error new codes handling and error messages.
1 parent d3c9293 commit 9ec9638

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

domaintools/base_results.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ def setStatus(self, code, response=None):
222222
if callable(reason):
223223
reason = reason()
224224

225-
if code == 400:
225+
if code in (400, 422):
226226
raise BadRequestException(code, reason)
227-
elif code == 403:
227+
elif code in (401, 403):
228228
raise NotAuthorizedException(code, reason)
229229
elif code == 404:
230230
raise NotFoundException(code, reason)

0 commit comments

Comments
 (0)