diff --git a/packages/artifact/RELEASES.md b/packages/artifact/RELEASES.md index 700f33c4..b20c3b60 100644 --- a/packages/artifact/RELEASES.md +++ b/packages/artifact/RELEASES.md @@ -33,3 +33,7 @@ - Increase chunk size during upload from 4MB to 8MB - Improve user-agent strings during API calls to help internally diagnose issues + +### 0.3.4 + +- Retry in the event of a 413 response diff --git a/packages/artifact/__tests__/util.test.ts b/packages/artifact/__tests__/util.test.ts index 5265437d..02930e1e 100644 --- a/packages/artifact/__tests__/util.test.ts +++ b/packages/artifact/__tests__/util.test.ts @@ -192,6 +192,7 @@ describe('Utils', () => { expect(utils.isRetryableStatusCode(HttpCodes.OK)).toEqual(false) expect(utils.isRetryableStatusCode(HttpCodes.NotFound)).toEqual(false) expect(utils.isRetryableStatusCode(HttpCodes.Forbidden)).toEqual(false) + expect(utils.isRetryableStatusCode(413)).toEqual(true) // Payload Too Large }) it('Test Throttled Status Code', () => { diff --git a/packages/artifact/package-lock.json b/packages/artifact/package-lock.json index 000e5ad3..44f6e56a 100644 --- a/packages/artifact/package-lock.json +++ b/packages/artifact/package-lock.json @@ -1,6 +1,6 @@ { "name": "@actions/artifact", - "version": "0.3.3", + "version": "0.3.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/artifact/package.json b/packages/artifact/package.json index b66035ee..a3c94cd4 100644 --- a/packages/artifact/package.json +++ b/packages/artifact/package.json @@ -1,6 +1,6 @@ { "name": "@actions/artifact", - "version": "0.3.3", + "version": "0.3.4", "preview": true, "description": "Actions artifact lib", "keywords": [ diff --git a/packages/artifact/src/internal/utils.ts b/packages/artifact/src/internal/utils.ts index 93c22b66..86b482bc 100644 --- a/packages/artifact/src/internal/utils.ts +++ b/packages/artifact/src/internal/utils.ts @@ -74,7 +74,8 @@ export function isRetryableStatusCode(statusCode?: number): boolean { HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout, - HttpCodes.TooManyRequests + HttpCodes.TooManyRequests, + 413 // Payload Too Large ] return retryableStatusCodes.includes(statusCode) }