mirror of
https://github.com/github/codeql-action.git
synced 2026-05-08 23:00:26 +00:00
add log statements to check rate limits
This commit is contained in:
Generated
+3
@@ -92,6 +92,9 @@ async function uploadPayload(payload, repositoryNwo, githubAuth, githubApiUrl, m
|
||||
// We avoid marking the job as failed to avoid breaking CI workflows.
|
||||
throw new Error('Upload failed (' + requestID + '): (' + statusCode + ') ' + JSON.stringify(response.data));
|
||||
}
|
||||
console.log("X-RateLimit-Limit = " + response.headers["X-RateLimit-Limit"]);
|
||||
console.log("X-RateLimit-Remaining = " + response.headers["X-RateLimit-Remaining"]);
|
||||
throw new Error('Abort here for testing purposes...');
|
||||
}
|
||||
// This case shouldn't ever happen as the final iteration of the loop
|
||||
// will always throw an error instead of exiting to here.
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -104,6 +104,10 @@ async function uploadPayload(
|
||||
// We avoid marking the job as failed to avoid breaking CI workflows.
|
||||
throw new Error('Upload failed (' + requestID + '): (' + statusCode + ') ' + JSON.stringify(response.data));
|
||||
}
|
||||
|
||||
console.log("X-RateLimit-Limit = " + response.headers["X-RateLimit-Limit"]);
|
||||
console.log("X-RateLimit-Remaining = " + response.headers["X-RateLimit-Remaining"]);
|
||||
throw new Error('Abort here for testing purposes...');
|
||||
}
|
||||
|
||||
// This case shouldn't ever happen as the final iteration of the loop
|
||||
|
||||
Reference in New Issue
Block a user