Skip to content

Commit

Permalink
Merge branch 'aws:master' into feature/utg
Browse files Browse the repository at this point in the history
  • Loading branch information
laileni-aws authored Sep 10, 2024
2 parents cf5767f + 1dd9064 commit 18101ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 2 additions & 1 deletion packages/core/src/shared/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,7 @@ export function isNetworkError(err?: unknown): err is Error & { code: string } {
'EAI_FAIL',
'502', // This may be irrelevant as isBadResponseCode() may be all we need
'InternalServerException',
'ERR_SSL_WRONG_VERSION_NUMBER',
].includes(err.code)
}

Expand Down Expand Up @@ -890,7 +891,7 @@ export function isError(err: Error, id: string, messageIncludes: string = '') {
* These are the errors explicitly seen in telemetry. We can instead do any non-200 response code
* later, but this will give us better visibility in to the actual error codes we are currently getting.
*/
const errorResponseCodes = [302, 403, 502]
const errorResponseCodes = [302, 403, 404, 502, 503]

/**
* Returns true if the given error is a bad response code
Expand Down
7 changes: 0 additions & 7 deletions packages/core/src/test/shared/errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,13 +526,6 @@ describe('util', function () {
reponseCodeErr.name = '502'
assert.deepStrictEqual(isNetworkError(reponseCodeErr), true, 'Did not indicate 502 error as network error')
reponseCodeErr = new Error()
reponseCodeErr.name = '503'
assert.deepStrictEqual(
isNetworkError(reponseCodeErr),
false,
'Incorrectly indicated 503 error as network error'
)
reponseCodeErr = new Error()
reponseCodeErr.name = '200'
assert.deepStrictEqual(
isNetworkError(reponseCodeErr),
Expand Down

0 comments on commit 18101ab

Please sign in to comment.