File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66741,16 +66741,15 @@ function installCpythonFromRelease(release) {
6674166741 yield installPython(pythonExtractedFolder);
6674266742 }
6674366743 catch (err) {
66744- if (err instanceof Error ) {
66744+ if (err instanceof tc.HTTPError ) {
6674566745 // Rate limit?
66746- if (err instanceof tc.HTTPError &&
66747- (err.httpStatusCode === 403 || err.httpStatusCode === 429)) {
66746+ if (err.httpStatusCode === 403 || err.httpStatusCode === 429) {
6674866747 core.info(`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`);
6674966748 }
6675066749 else {
6675166750 core.info(err.message);
6675266751 }
66753- if (err.stack !== undefined ) {
66752+ if (err.stack) {
6675466753 core.debug(err.stack);
6675566754 }
6675666755 }
Original file line number Diff line number Diff line change @@ -86,19 +86,16 @@ export async function installCpythonFromRelease(release: tc.IToolRelease) {
8686 core . info ( 'Execute installation script' ) ;
8787 await installPython ( pythonExtractedFolder ) ;
8888 } catch ( err ) {
89- if ( err instanceof Error ) {
89+ if ( err instanceof tc . HTTPError ) {
9090 // Rate limit?
91- if (
92- err instanceof tc . HTTPError &&
93- ( err . httpStatusCode === 403 || err . httpStatusCode === 429 )
94- ) {
91+ if ( err . httpStatusCode === 403 || err . httpStatusCode === 429 ) {
9592 core . info (
9693 `Received HTTP status code ${ err . httpStatusCode } . This usually indicates the rate limit has been exceeded`
9794 ) ;
9895 } else {
9996 core . info ( err . message ) ;
10097 }
101- if ( err . stack !== undefined ) {
98+ if ( err . stack ) {
10299 core . debug ( err . stack ) ;
103100 }
104101 }
You can’t perform that action at this time.
0 commit comments