Merge pull request #1095 from gsmet/no-log-on-cancel

Log 202 message at the FINE level
This commit is contained in:
Liam Newman
2021-04-14 15:04:38 -07:00
committed by GitHub

View File

@@ -438,15 +438,15 @@ abstract class GitHubClient {
// special case handling for 304 unmodified, as the content will be ""
} else if (responseInfo.statusCode() == HttpURLConnection.HTTP_ACCEPTED) {
// Response code 202 means data is being generated.
// Response code 202 means data is being generated or an action that can require some time is triggered.
// This happens in specific cases:
// statistics - See https://developer.github.com/v3/repos/statistics/#a-word-about-caching
// fork creation - See https://developer.github.com/v3/repos/forks/#create-a-fork
// workflow run cancellation - See https://docs.github.com/en/rest/reference/actions#cancel-a-workflow-run
LOGGER.log(INFO,
LOGGER.log(FINE,
"Received HTTP_ACCEPTED(202) from " + responseInfo.url().toString()
+ " . Please try again in 5 seconds.");
// Maybe throw an exception instead?
} else if (handler != null) {
body = handler.apply(responseInfo);
}