diff --git a/lib/logger/__snapshots__/err-serializer.spec.ts.snap b/lib/logger/__snapshots__/err-serializer.spec.ts.snap index 055f13499fd76c6c7929bcafb9778fefbdf67d25..a0a1ff2a1a9ee34c8bccb4b32dfcfb34d9c1eadb 100644 --- a/lib/logger/__snapshots__/err-serializer.spec.ts.snap +++ b/lib/logger/__snapshots__/err-serializer.spec.ts.snap @@ -28,6 +28,7 @@ exports[`logger/err-serializer got sanitize http error 1`] = ` "content-type": "application/json", }, "httpVersion": null, + "retryCount": 0, "statusCode": 412, "statusMessage": "Precondition Failed", }, diff --git a/lib/logger/utils.ts b/lib/logger/utils.ts index 90e0e263f76510c6ab69398e23cfa71b33f7b31f..d787f4f678d45602214a292221afd9e048c1b642 100644 --- a/lib/logger/utils.ts +++ b/lib/logger/utils.ts @@ -85,6 +85,7 @@ export default function prepareError(err: Error): Record<string, unknown> { err.name === 'TimeoutError' ? undefined : clone(err.response.body), headers: clone(err.response.headers), httpVersion: err.response.httpVersion, + retryCount: err.response.retryCount, }; } } diff --git a/lib/util/http/github.ts b/lib/util/http/github.ts index 2b0d1f39bcb5c40e979462b10af0281155b5b678..8de822fba22abae56012cffe3b540038746dd8ee 100644 --- a/lib/util/http/github.ts +++ b/lib/util/http/github.ts @@ -67,6 +67,7 @@ function handleGotError( message = String(body.message); } if ( + err.code === 'ERR_HTTP2_STREAM_ERROR' || err.code === 'ENOTFOUND' || err.code === 'ETIMEDOUT' || err.code === 'EAI_AGAIN' ||