Do not hide ReserveCacheError failures

When the target entry already exists, we are unable to save. Ensuring this situation
is logged helps make the logs more understandable.
This commit is contained in:
Daz DeBoer 2022-01-19 13:31:55 -07:00
parent 08d5b40ca5
commit c349fa5b1f
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: DD6B9F0B06683D5D

View file

@ -99,11 +99,7 @@ export function handleCacheFailure(error: unknown, message: string): void {
}
if (error instanceof cache.ReserveCacheError) {
// Reserve cache errors are expected if the artifact has been previously cached
if (isCacheDebuggingEnabled()) {
core.info(`${message}: ${error}`)
} else {
core.debug(`${message}: ${error}`)
}
core.info(`${message}: ${error}`)
} else {
// Warn on all other errors
core.warning(`${message}: ${error}`)