mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2025-08-07 22:39:01 +08:00
Handle non-successful responses from uploadChunk
This commit is contained in:
parent
f1b118b2a9
commit
678f278caa
@ -194,7 +194,7 @@ async function uploadChunk(
|
||||
'Content-Range': getContentRange(start, end)
|
||||
}
|
||||
|
||||
await retryHttpClientResponse(
|
||||
const uploadChunkResponse = await retryHttpClientResponse(
|
||||
`uploadChunk (start: ${start}, end: ${end})`,
|
||||
async () =>
|
||||
httpClient.sendStream(
|
||||
@ -204,6 +204,12 @@ async function uploadChunk(
|
||||
additionalHeaders
|
||||
)
|
||||
)
|
||||
|
||||
if (!isSuccessStatusCode(uploadChunkResponse.message.statusCode)) {
|
||||
throw new Error(
|
||||
`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
async function uploadFile(
|
||||
|
Loading…
x
Reference in New Issue
Block a user