Updated gam report <ActivityApplictionName> to retry/handle the following error:

ERROR: 503: serviceNotAvailable - The service is currently unavailable.
This commit is contained in:
Ross Scroggs
2024-05-01 13:33:13 -07:00
parent 683435cfb8
commit 42d33786a1
7 changed files with 277 additions and 15 deletions

View File

@@ -2,11 +2,17 @@
Merged GAM-Team version
6.75.02
Updated `gam report <ActivityApplictionName>` to retry/handle the following error:
```
ERROR: 503: serviceNotAvailable - The service is currently unavailable.
```
6.75.01
Added option `admin <EmailAddress>` to `gam upload sakey`.
6.75.00
Updated `gam create project` to simplify handling the situation where your workspace is configured to disable service account private key uploads.

View File

@@ -13881,7 +13881,8 @@ def doReport():
try:
feed = callGAPIpages(service, 'list', 'items',
pageMessage=pageMessage, maxItems=maxActivities,
throwReasons=[GAPI.BAD_REQUEST, GAPI.INVALID, GAPI.INVALID_INPUT, GAPI.AUTH_ERROR],
throwReasons=[GAPI.BAD_REQUEST, GAPI.INVALID, GAPI.INVALID_INPUT, GAPI.AUTH_ERROR, GAPI.SERVICE_NOT_AVAILABLE],
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
applicationName=report, userKey=user, customerId=customerId,
actorIpAddress=actorIpAddress, orgUnitID=orgUnitId,
startTime=startEndTime.startTime, endTime=startEndTime.endTime,
@@ -13893,7 +13894,7 @@ def doReport():
continue
printErrorMessage(BAD_REQUEST_RC, Msg.BAD_REQUEST)
break
except (GAPI.invalid, GAPI.invalidInput) as e:
except (GAPI.invalid, GAPI.invalidInput, GAPI.serviceNotAvailable) as e:
systemErrorExit(GOOGLE_API_ERROR_RC, str(e))
except GAPI.authError:
accessErrorExit(None)