Skip to content

Commit

Permalink
Include more info in data-retention gdrive api error
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmarklloyd committed Dec 5, 2021
1 parent 7e2a102 commit a47fed8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/data-retention/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,9 @@ func getOrCreateBackupFile(srv *drive.Service, bucketName, backupFileName string
localBackupFilePath := fmt.Sprintf("/tmp/%s/%s", bucketName, backupFileName)
r, err := srv.Files.List().Q(fmt.Sprintf("name = '%s'", bucketName)).Do()
if err != nil {
return "", err
return "", fmt.Errorf("searching for bucket: %s", err)
}

// var bucket drive.File
if len(r.Files) == 0 {
fmt.Println("Cold storage bucket does not exist, creating it now")

Expand Down

0 comments on commit a47fed8

Please sign in to comment.