Skip to content

Commit 57b41b4

Browse files
committed
SAC-30519: fix pylint failure
1 parent 1814e87 commit 57b41b4

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

tap_zendesk/streams.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,6 @@ def check_access(self):
524524
except http.ZendeskNotFoundError:
525525
# Skip 404 as goal is to check whether TalkPhoneNumbers have read permission
526526
pass
527-
except http.ZendeskForbiddenError:
528-
raise # Propagate to discover.py which adds stream to error_list
529527
except requests.exceptions.HTTPError as e:
530528
# Zenpy's Talk API raises requests.HTTPError directly for certain HTTP errors.
531529
# Convert 403 Forbidden to ZendeskForbiddenError for consistent handling in discover.py.
@@ -538,8 +536,8 @@ def check_access(self):
538536
args0 = json.loads(e.args[0])
539537
err = args0.get('error')
540538
description = args0.get('description', '')
541-
except (json.JSONDecodeError, ValueError, IndexError):
542-
raise e
539+
except (json.JSONDecodeError, ValueError, IndexError) as exc:
540+
raise e from exc
543541
if (isinstance(err, dict) and err.get('message') == "You do not have access to this page. Please contact the account owner of this help desk for further help.") \
544542
or description == "You are missing the following required scopes: read":
545543
raise http.ZendeskForbiddenError(str(e)) from None

0 commit comments

Comments
 (0)