Skip to content

Commit

Permalink
Print more error info for minio (#136)
Browse files Browse the repository at this point in the history
* Print more error info for minio

* Unpacked error info
  • Loading branch information
MaxJa4 authored Aug 15, 2022
1 parent cc912d7 commit 2b7f0c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/backup/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,8 @@ func (s *script) copyArchive() error {
ContentType: "application/tar+gzip",
StorageClass: s.c.AwsStorageClass,
}); err != nil {
return fmt.Errorf("copyBackup: error uploading backup to remote storage: %w", err)
errResp := minio.ToErrorResponse(err)
return fmt.Errorf("copyBackup: error uploading backup to remote storage: [Message]: '%s', [Code]: %s, [StatusCode]: %d", errResp.Message, errResp.Code, errResp.StatusCode)
}
s.logger.Infof("Uploaded a copy of backup `%s` to bucket `%s`.", s.file, s.c.AwsS3BucketName)
}
Expand Down

0 comments on commit 2b7f0c5

Please sign in to comment.