mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-03 18:53:18 +08:00
New Response Type
This commit is contained in:
3
packages/cache/src/cache.ts
vendored
3
packages/cache/src/cache.ts
vendored
@@ -182,8 +182,9 @@ export async function saveCache(
|
||||
cacheSize
|
||||
})
|
||||
|
||||
if(reserveCacheResponse?.statusCode === 400){
|
||||
if(reserveCacheResponse?.statusCode === 400 && reserveCacheResponse?.typeKey === "InvalidReserveCacheRequestException"){
|
||||
throw new ReserveCacheError(
|
||||
reserveCacheResponse?.message ??
|
||||
`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user