Basic error handling in wrappers

This commit is contained in:
Sankalp Kotewar 2022-12-20 10:10:04 +00:00 committed by GitHub
parent ed5e94a5f5
commit 9ec16e95f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 209 additions and 142 deletions

View file

@ -47354,12 +47354,10 @@ function saveCache(paths, key, options) {
}
catch (error) {
const typedError = error;
if (typedError.name === ValidationError.name) {
if (typedError.name === ValidationError.name ||
typedError.name === ReserveCacheError.name) {
throw error;
}
else if (typedError.name === ReserveCacheError.name) {
core.info(`Failed to save: ${typedError.message}`);
}
else {
core.warning(`Failed to save: ${typedError.message}`);
}