Skip to content

Commit b2cba16

Browse files
authored
Retry on 413 (#540)
1 parent e3c6237 commit b2cba16

5 files changed

Lines changed: 9 additions & 3 deletions

File tree

packages/artifact/RELEASES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@
3333

3434
- Increase chunk size during upload from 4MB to 8MB
3535
- Improve user-agent strings during API calls to help internally diagnose issues
36+
37+
### 0.3.4
38+
39+
- Retry in the event of a 413 response

packages/artifact/__tests__/util.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ describe('Utils', () => {
192192
expect(utils.isRetryableStatusCode(HttpCodes.OK)).toEqual(false)
193193
expect(utils.isRetryableStatusCode(HttpCodes.NotFound)).toEqual(false)
194194
expect(utils.isRetryableStatusCode(HttpCodes.Forbidden)).toEqual(false)
195+
expect(utils.isRetryableStatusCode(413)).toEqual(true) // Payload Too Large
195196
})
196197

197198
it('Test Throttled Status Code', () => {

packages/artifact/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/artifact/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@actions/artifact",
3-
"version": "0.3.3",
3+
"version": "0.3.4",
44
"preview": true,
55
"description": "Actions artifact lib",
66
"keywords": [

packages/artifact/src/internal/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ export function isRetryableStatusCode(statusCode?: number): boolean {
7474
HttpCodes.BadGateway,
7575
HttpCodes.ServiceUnavailable,
7676
HttpCodes.GatewayTimeout,
77-
HttpCodes.TooManyRequests
77+
HttpCodes.TooManyRequests,
78+
413 // Payload Too Large
7879
]
7980
return retryableStatusCodes.includes(statusCode)
8081
}

0 commit comments

Comments
 (0)