Skip to content

Commit

Permalink
Fix 422 Status code handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Luiza Coman authored and Luiza Coman committed Oct 30, 2023
1 parent 02da556 commit 3c55f75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zdesk/zdesk.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def call(self, path, query=None, method='GET', data=None,

code = response.status_code
try:
if not 200 <= code < 300 and code != 422:
if not 200 <= code < 300:
if code == 401:
raise AuthenticationError(
response.content, code, response)
Expand All @@ -445,7 +445,7 @@ def call(self, path, query=None, method='GET', data=None,
raise ZendeskError(
response.content, code, response)
except ZendeskError:
if request_count <= self.max_retries:
if request_count <= self.max_retries and code != 422:
self._handle_retry(response)
continue
else:
Expand Down

0 comments on commit 3c55f75

Please sign in to comment.