New Response Type

This commit is contained in:
Deepak Dahiya
2022-03-31 09:42:59 +00:00
committed by GitHub
parent b602df7c05
commit 79acd5bac4
5 changed files with 28 additions and 10 deletions

View File

@@ -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.`
)
}