Add more details to error message

This commit is contained in:
Raymond Hill 2023-11-11 13:25:58 -05:00
parent 130c437dd3
commit 4422926b63
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -174,7 +174,7 @@ async function applyPatchAndValidate(assetDetails, diffDetails) {
i.toString(16).padStart(2, '0')
).join('');
if ( sha1Full.startsWith(checksum) === false ) {
assetDetails.error = 'badchecksum';
assetDetails.error = `badchecksum: expected ${checksum}, computed ${sha1Full.slice(0, checksum.length)}`;
return false;
}
assetDetails.text = textAfter;