added info error as well

This commit is contained in:
Shubham Tiwari
2022-06-20 04:47:59 +00:00
committed by GitHub
parent e051715283
commit 639c79e4a4
2 changed files with 13 additions and 8 deletions
+6 -1
View File
@@ -225,7 +225,12 @@ export async function saveCache(
core.debug(`Saving Cache (ID: ${cacheId})`)
await cacheHttpClient.saveCache(cacheId, archivePath, options)
} catch(error) {
core.warning(`Fail to save: ${error}`)
const typedError = error as Error;
if (typedError.name === ReserveCacheError.name) {
core.info(`Fail to save: ${typedError.message}`)
} else {
core.warning(`Fail to save: ${typedError.message}`)
}
} finally {
// Try to delete the archive to save space
try {