mirror of https://github.com/actions/toolkit
Retry on 413 (#540)
parent
e3c6237940
commit
b2cba168a2
|
@ -33,3 +33,7 @@
|
||||||
|
|
||||||
- Increase chunk size during upload from 4MB to 8MB
|
- Increase chunk size during upload from 4MB to 8MB
|
||||||
- Improve user-agent strings during API calls to help internally diagnose issues
|
- Improve user-agent strings during API calls to help internally diagnose issues
|
||||||
|
|
||||||
|
### 0.3.4
|
||||||
|
|
||||||
|
- Retry in the event of a 413 response
|
||||||
|
|
|
@ -192,6 +192,7 @@ describe('Utils', () => {
|
||||||
expect(utils.isRetryableStatusCode(HttpCodes.OK)).toEqual(false)
|
expect(utils.isRetryableStatusCode(HttpCodes.OK)).toEqual(false)
|
||||||
expect(utils.isRetryableStatusCode(HttpCodes.NotFound)).toEqual(false)
|
expect(utils.isRetryableStatusCode(HttpCodes.NotFound)).toEqual(false)
|
||||||
expect(utils.isRetryableStatusCode(HttpCodes.Forbidden)).toEqual(false)
|
expect(utils.isRetryableStatusCode(HttpCodes.Forbidden)).toEqual(false)
|
||||||
|
expect(utils.isRetryableStatusCode(413)).toEqual(true) // Payload Too Large
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Test Throttled Status Code', () => {
|
it('Test Throttled Status Code', () => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@actions/artifact",
|
"name": "@actions/artifact",
|
||||||
"version": "0.3.3",
|
"version": "0.3.4",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@actions/artifact",
|
"name": "@actions/artifact",
|
||||||
"version": "0.3.3",
|
"version": "0.3.4",
|
||||||
"preview": true,
|
"preview": true,
|
||||||
"description": "Actions artifact lib",
|
"description": "Actions artifact lib",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|
|
@ -74,7 +74,8 @@ export function isRetryableStatusCode(statusCode?: number): boolean {
|
||||||
HttpCodes.BadGateway,
|
HttpCodes.BadGateway,
|
||||||
HttpCodes.ServiceUnavailable,
|
HttpCodes.ServiceUnavailable,
|
||||||
HttpCodes.GatewayTimeout,
|
HttpCodes.GatewayTimeout,
|
||||||
HttpCodes.TooManyRequests
|
HttpCodes.TooManyRequests,
|
||||||
|
413 // Payload Too Large
|
||||||
]
|
]
|
||||||
return retryableStatusCodes.includes(statusCode)
|
return retryableStatusCodes.includes(statusCode)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue