1
0
Fork 0

Merge pull request #1050 from actions/fix_cache_error_type

Fix error type so that cache size limit violation is shown as warning( similar to previous error)
pull/975/merge
Anurag Chauhan 2022-04-07 14:46:23 +05:30 committed by GitHub
commit 7654d97eb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

2
packages/cache/package-lock.json generated vendored
View File

@ -1,6 +1,6 @@
{
"name": "@actions/cache",
"version": "2.0.1",
"version": "2.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {

View File

@ -1,6 +1,6 @@
{
"name": "@actions/cache",
"version": "2.0.1",
"version": "2.0.2",
"preview": true,
"description": "Actions cache lib",
"keywords": [

View File

@ -197,7 +197,7 @@ export async function saveCache(
if (reserveCacheResponse?.result?.cacheId) {
cacheId = reserveCacheResponse?.result?.cacheId
} else if (reserveCacheResponse?.statusCode === 400) {
throw new ReserveCacheError(
throw new Error(
reserveCacheResponse?.error?.message ??
`Cache size of ~${Math.round(
archiveFileSize / (1024 * 1024)