Skip to content

Commit

Permalink
Remove "uploaded" from two error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
John Schulz committed Nov 6, 2020
1 parent 2e73e4e commit 3c38e23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ export async function unpackArchiveToCache(
});
} catch (error) {
throw new PackageInvalidArchiveError(
`Error during extraction of uploaded package: ${error}. Assumed content type was ${contentType}, check if this matches the archive type.`
`Error during extraction of package: ${error}. Assumed content type was ${contentType}, check if this matches the archive type.`
);
}

// While unpacking a tar.gz file with unzipBuffer() will result in a thrown error in the try-catch above,
// unpacking a zip file with untarBuffer() just results in nothing.
if (paths.length === 0) {
throw new PackageInvalidArchiveError(
`Uploaded archive seems empty. Assumed content type was ${contentType}, check if this matches the archive type.`
`Archive seems empty. Assumed content type was ${contentType}, check if this matches the archive type.`
);
}
return paths;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default function (providerContext: FtrProviderContext) {
.send(buf)
.expect(400);
expect(res.error.text).to.equal(
'{"statusCode":400,"error":"Bad Request","message":"Uploaded archive seems empty. Assumed content type was application/gzip, check if this matches the archive type."}'
'{"statusCode":400,"error":"Bad Request","message":"Archive seems empty. Assumed content type was application/gzip, check if this matches the archive type."}'
);
});

Expand All @@ -105,7 +105,7 @@ export default function (providerContext: FtrProviderContext) {
.send(buf)
.expect(400);
expect(res.error.text).to.equal(
'{"statusCode":400,"error":"Bad Request","message":"Error during extraction of uploaded package: Error: end of central directory record signature not found. Assumed content type was application/zip, check if this matches the archive type."}'
'{"statusCode":400,"error":"Bad Request","message":"Error during extraction of package: Error: end of central directory record signature not found. Assumed content type was application/zip, check if this matches the archive type."}'
);
});

Expand Down

0 comments on commit 3c38e23

Please sign in to comment.