@@ -78,7 +78,7 @@ func CompressPathToFile(pathToCompress string, enforceMaxFileSizeLimit bool) (st
78
78
// Create output file
79
79
outFile , err := os .Create (compressedFilePath )
80
80
if err != nil {
81
- return "" , 0 , nil , stacktrace .Propagate (err , "Failed to create output file '%s'." , compressedFilePath )
81
+ return "" , 0 , nil , stacktrace .Propagate (err , "An error occurred when creating the output file '%s'." , compressedFilePath )
82
82
}
83
83
defer outFile .Close ()
84
84
@@ -102,18 +102,18 @@ func CompressPathToFile(pathToCompress string, enforceMaxFileSizeLimit bool) (st
102
102
// Create files from disk with default options
103
103
files , err := archives .FilesFromDisk (ctx , nil , filenameMappings )
104
104
if err != nil {
105
- return "" , 0 , nil , stacktrace .Propagate (err , "Failed to create files list for archive from '%s'." , pathToCompress )
105
+ return "" , 0 , nil , stacktrace .Propagate (err , "An error occurred when creating files list for archive from '%s'." , pathToCompress )
106
106
}
107
107
108
108
// Create the archive
109
109
if err = format .Archive (ctx , outFile , files ); err != nil {
110
- return "" , 0 , nil , stacktrace .Propagate (err , "Failed to compress '%s'." , pathToCompress )
110
+ return "" , 0 , nil , stacktrace .Propagate (err , "An error occurred when compressing '%s'." , pathToCompress )
111
111
}
112
112
113
113
compressedFileInfo , err := os .Stat (compressedFilePath )
114
114
if err != nil {
115
115
return "" , 0 , nil , stacktrace .Propagate (err ,
116
- "Failed to inspect temporary archive file at '%s' during files upload for '%s'." ,
116
+ "An error occurred when inspecting the temporary archive file at '%s' during files upload for '%s'." ,
117
117
tempDir , pathToCompress )
118
118
}
119
119
@@ -122,7 +122,7 @@ func CompressPathToFile(pathToCompress string, enforceMaxFileSizeLimit bool) (st
122
122
compressedFileSize = uint64 (compressedFileInfo .Size ())
123
123
} else {
124
124
return "" , 0 , nil , stacktrace .Propagate (err ,
125
- "Failed to compute archive size for temporary file '%s' obtained compressing path '%s'" ,
125
+ "An error occurred when computing the archive size for the temporary file '%s' obtained compressing path '%s'" ,
126
126
tempDir , pathToCompress )
127
127
}
128
128
0 commit comments