From 0b2505c7540b9dd1a16f1bd4b6f64c4514559ed5 Mon Sep 17 00:00:00 2001 From: Anurag Chauhan <44864882+anuragc617@users.noreply.github.com> Date: Thu, 7 Apr 2022 09:08:16 +0000 Subject: [PATCH] Fix error type so that size limit violation is shown as warning --- packages/cache/package-lock.json | 2 +- packages/cache/package.json | 2 +- packages/cache/src/cache.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cache/package-lock.json b/packages/cache/package-lock.json index 3017263a..2ec7b7d6 100644 --- a/packages/cache/package-lock.json +++ b/packages/cache/package-lock.json @@ -1,6 +1,6 @@ { "name": "@actions/cache", - "version": "2.0.1", + "version": "2.0.2", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/cache/package.json b/packages/cache/package.json index 6ae7b318..97f774b1 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -1,6 +1,6 @@ { "name": "@actions/cache", - "version": "2.0.1", + "version": "2.0.2", "preview": true, "description": "Actions cache lib", "keywords": [ diff --git a/packages/cache/src/cache.ts b/packages/cache/src/cache.ts index 01d49f9f..86dd60c8 100644 --- a/packages/cache/src/cache.ts +++ b/packages/cache/src/cache.ts @@ -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)