Skip to content

Commit

Permalink
add more egnyte failure logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Weves committed Dec 12, 2024
1 parent a52c821 commit 7c29b1e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion backend/danswer/connectors/egnyte/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,18 @@ def _make_request() -> requests.Response:
timeout=timeout,
stream=stream,
)
response.raise_for_status()
try:
response.raise_for_status()
except requests.exceptions.HTTPError as e:
if e.response.status_code != 403:
logger.exception(
f"Failed to call Egnyte API.\n"
f"URL: {url}\n"
f"Headers: {headers}\n"
f"Data: {data}\n"
f"Params: {params}"
)
raise e
return response

return _make_request()
Expand Down

0 comments on commit 7c29b1e

Please sign in to comment.