Compare commits

...

1 Commits

Author SHA1 Message Date
Nick Fyson
689953267a add log statements to check rate limits 2020-08-24 13:29:29 +01:00
3 changed files with 8 additions and 1 deletions

3
lib/upload-lib.js generated
View File

@@ -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

View File

@@ -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