nautobot-app-circuit-maintenance
nautobot-app-circuit-maintenance copied to clipboard
GmailAPI needs retry logic for intermittent HttpError
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: