Skip to content

Commit 772f77a

Browse files
committed
IDEV-2013: Update error new codes handling and error messages.
1 parent ab98b42 commit 772f77a

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
@@ -182,9 +182,9 @@ def setStatus(self, code, response=None):
182182
if callable(reason):
183183
reason = reason()
184184

185-
if code == 400:
185+
if code in (400, 422):
186186
raise BadRequestException(code, reason)
187-
elif code == 403:
187+
elif code in (401, 403):
188188
raise NotAuthorizedException(code, reason)
189189
elif code == 404:
190190
raise NotFoundException(code, reason)

0 commit comments

Comments
 (0)