Print more error info for minio (#136)

* Print more error info for minio

* Unpacked error info
This commit is contained in:
MaxJa4 2022-08-15 09:25:32 +02:00 committed by GitHub
parent cc912d7b64
commit 2b7f0c52c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -534,7 +534,8 @@ func (s *script) copyArchive() error {
ContentType: "application/tar+gzip", ContentType: "application/tar+gzip",
StorageClass: s.c.AwsStorageClass, StorageClass: s.c.AwsStorageClass,
}); err != nil { }); 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) s.logger.Infof("Uploaded a copy of backup `%s` to bucket `%s`.", s.file, s.c.AwsS3BucketName)
} }