File tree 2 files changed +6
-10
lines changed
2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -66763,16 +66763,15 @@ function installCpythonFromRelease(release) {
66763
66763
yield installPython(pythonExtractedFolder);
66764
66764
}
66765
66765
catch (err) {
66766
- if (err instanceof Error ) {
66766
+ if (err instanceof tc.HTTPError ) {
66767
66767
// Rate limit?
66768
- if (err instanceof tc.HTTPError &&
66769
- (err.httpStatusCode === 403 || err.httpStatusCode === 429)) {
66768
+ if (err.httpStatusCode === 403 || err.httpStatusCode === 429) {
66770
66769
core.info(`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`);
66771
66770
}
66772
66771
else {
66773
66772
core.info(err.message);
66774
66773
}
66775
- if (err.stack !== undefined ) {
66774
+ if (err.stack) {
66776
66775
core.debug(err.stack);
66777
66776
}
66778
66777
}
Original file line number Diff line number Diff line change @@ -86,19 +86,16 @@ export async function installCpythonFromRelease(release: tc.IToolRelease) {
86
86
core . info ( 'Execute installation script' ) ;
87
87
await installPython ( pythonExtractedFolder ) ;
88
88
} catch ( err ) {
89
- if ( err instanceof Error ) {
89
+ if ( err instanceof tc . HTTPError ) {
90
90
// 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 ) {
95
92
core . info (
96
93
`Received HTTP status code ${ err . httpStatusCode } . This usually indicates the rate limit has been exceeded`
97
94
) ;
98
95
} else {
99
96
core . info ( err . message ) ;
100
97
}
101
- if ( err . stack !== undefined ) {
98
+ if ( err . stack ) {
102
99
core . debug ( err . stack ) ;
103
100
}
104
101
}
You can’t perform that action at this time.
0 commit comments