Skip to content
This repository was archived by the owner on Jun 23, 2022. It is now read-only.
This repository was archived by the owner on Jun 23, 2022. It is now read-only.

Properly handle Google API service errors #10

@kylegibson-rldatix

Description

@kylegibson-rldatix

Sometimes the google api may not be available. In that case, we need to be able to retry in a few minutes

Traceback (most recent call last):
  File "/var/task/flask/app.py", line 2292, in wsgi_app
  response = self.full_dispatch_request()
  File "/var/task/flask/app.py", line 1815, in full_dispatch_request
  rv = self.handle_user_exception(e)
  File "/var/task/flask/app.py", line 1718, in handle_user_exception
  reraise(exc_type, exc_value, tb)
  File "/var/task/flask/_compat.py", line 35, in reraise
  raise value
  File "/var/task/flask/app.py", line 1813, in full_dispatch_request
  rv = self.dispatch_request()
  File "/var/task/flask/app.py", line 1799, in dispatch_request
  return self.view_functions[rule.endpoint](**req.view_args)
  File "/var/task/main.py", line 77, in handle_incoming_github_event
  handle_merged_pr(event)
  File "/var/task/main.py", line 161, in handle_merged_pr
  update_spreadsheet(book, event)
  File "/var/task/main.py", line 239, in update_spreadsheet
  display_name = get_gh_login_display_name_mapping(book, merged_by)
  File "/var/task/main.py", line 253, in get_gh_login_display_name_mapping
  sheet = book.worksheet(DEV_DASHBOARD_GH_LOGIN_LOOKUP_SHEET_NAME)
  File "/var/task/gspread/models.py", line 235, in worksheet
  sheet_data = self.fetch_sheet_metadata()
  File "/var/task/gspread/models.py", line 184, in fetch_sheet_metadata
  r = self.client.request('get', url, params=params)
  File "/var/task/gspread/client.py", line 79, in request
  raise APIError(response)
gspread.exceptions.APIError: {
  "error": {
  "code": 503,
  "message": "The service is currently unavailable.",
  "status": "UNAVAILABLE"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions