Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Github] Update Logs Private Repository Sync Errors #2816

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions connectors/sources/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ async def _get_retry_after(self, resource_type):
async def _put_to_sleep(self, resource_type):
retry_after = await self._get_retry_after(resource_type=resource_type)
self._logger.debug(
f"Connector will attempt to retry after {retry_after} seconds."
f"Rate limit exceeded. Retry after {retry_after} seconds. Resource type: {resource_type}"
)
await self._sleeps.sleep(retry_after)
msg = "Rate limit exceeded."
Expand Down Expand Up @@ -817,7 +817,10 @@ async def graphql(self, query, variables=None):
await self._put_to_sleep(resource_type="graphql")
msg = f"Error while executing query. Exception: {exception.response.get('errors')}"
raise Exception(msg) from exception
except Exception:
except Exception as e:
self._logger.debug(
f"An unexpected error occurred while executing GraphQL query: {query}. Error: {e}"
)
raise

@retryable(
Expand Down Expand Up @@ -862,7 +865,10 @@ async def get_github_item(self, resource):
raise
except RateLimitExceeded:
await self._put_to_sleep("core")
except Exception:
except Exception as e:
self._logger.debug(
f"An unexpected error occurred while getting GitHub item: {resource}. Error: {e}"
)
raise

async def paginated_api_call(self, query, variables, keys):
Expand Down