mirror of
https://github.com/peridotbuild/peridot.git
synced 2024-10-08 08:54:12 +00:00
Make checksum error non retryable error
This commit is contained in:
parent
1ed6fd238f
commit
8804d76566
@ -100,7 +100,11 @@ func (w *Worker) ImportRPM(uri string, checksumSha256 string, osRelease string)
|
||||
return nil, errors.Wrap(err, "failed to hash resource")
|
||||
}
|
||||
if hex.EncodeToString(hash.Sum(nil)) != checksumSha256 {
|
||||
return nil, errors.New("checksum does not match")
|
||||
return nil, temporal.NewNonRetryableApplicationError(
|
||||
"checksum does not match",
|
||||
"checksumDoesNotMatch",
|
||||
errors.New("client submitted a checksum that does not match the resource"),
|
||||
)
|
||||
}
|
||||
|
||||
// Read the RPM headers
|
||||
|
Loading…
Reference in New Issue
Block a user