nautobot-app-circuit-maintenance icon indicating copy to clipboard operation
nautobot-app-circuit-maintenance copied to clipboard

GmailAPI needs retry logic for intermittent HttpError

Open glennmatthews opened this issue 6 months ago • 0 comments

Environment

  • Python version:
  • Nautobot version: 1.6.6
  • nautobot-circuit-maintenance version: 1.0.1

Expected Behavior

Update Circuit Maintenance job should run to completion when retrieving emails from Gmail.

Observed Behavior

The GmailAPI.fetch_email() function doesn't have any try/except logic for googleapiclient.errors.HttpError exceptions, so when one happens, the entire job fails and aborts.

This is not a "hard" failure like bad authentication credentials, this instead happens partway through an otherwise successful job run where any number of emails are initially retrieved and processed, but for one particular email an intermittent HttpError exception is encountered:

image

Steps to Reproduce

glennmatthews avatar Dec 07 '23 16:12 glennmatthews