diff --git a/src/index.ts b/src/index.ts index 29d949f..141c39a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -26,7 +26,7 @@ export function requestLog(octokit: Octokit) { .catch((error) => { const requestId = - error.response.headers["x-github-request-id"] || "UNKNOWN"; + error.response?.headers["x-github-request-id"] || "UNKNOWN"; octokit.log.error( `${requestOptions.method} ${path} - ${error.status} with id ${requestId} in ${ Date.now() - start