Updated gam create teamdrive to handle the following error:

ERROR: 403: userCannotCreateTeamDrives - The authenticated user cannot create new shared drives.
This commit is contained in:
Ross Scroggs
2023-08-30 08:04:01 -07:00
parent 59b653f92a
commit c6de3de370
6 changed files with 28 additions and 10 deletions

View File

@ -165,6 +165,7 @@ TIME_RANGE_EMPTY = 'timeRangeEmpty'
TRANSIENT_ERROR = 'transientError'
UNKNOWN_ERROR = 'unknownError'
UPLOAD_TOO_LARGE = 'uploadTooLarge'
USER_CANNOT_CREATE_TEAMDRIVES = 'userCannotCreateTeamDrives'
USER_ACCESS = 'userAccess'
USER_NOT_FOUND = 'userNotFound'
USER_RATE_LIMIT_EXCEEDED = 'userRateLimitExceeded'
@ -613,6 +614,8 @@ class unknownError(Exception):
pass
class uploadTooLarge(Exception):
pass
class userCannotCreateTeamDrives(Exception):
pass
class userAccess(Exception):
pass
class userNotFound(Exception):
@ -763,6 +766,7 @@ REASON_EXCEPTION_MAP = {
TRANSIENT_ERROR: transientError,
UNKNOWN_ERROR: unknownError,
UPLOAD_TOO_LARGE: uploadTooLarge,
USER_CANNOT_CREATE_TEAMDRIVES: userCannotCreateTeamDrives,
USER_ACCESS: userAccess,
USER_NOT_FOUND: userNotFound,
USER_RATE_LIMIT_EXCEEDED: userRateLimitExceeded,