File tree Expand file tree Collapse file tree
packages/flowtest-cli/bin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ axiosRetry(axiosClient, {
1717 return retryCount * 1000 ; // Time interval between retries (1000 ms = 1 second)
1818 } ,
1919 retryCondition : ( error ) => {
20- // Retry on network errors or 5xx server errors
21- return error . response ?. status === 500 || error . code === 'ECONNABORTED' ;
20+ // Retry on network errors or rate limit errors or 5xx server errors
21+ return error . response ?. status === 500 || error . response ?. status === 429 || error . code === 'ECONNABORTED' ;
2222 } ,
2323} ) ;
2424
Original file line number Diff line number Diff line change @@ -110,7 +110,15 @@ const argv = yargs(hideBin(process.argv))
110110 ) ;
111111 console . log ( chalk . bold ( 'Build Scan: ' ) + chalk . dim ( `${ baseUrl } /scan/${ response . data . data [ 0 ] . id } ` ) ) ;
112112 } catch ( error ) {
113- //console.log(error);
113+ if ( error ?. response ) {
114+ if ( error . response ?. status === 403 || error . response ?. status === 429 ) {
115+ console . log ( chalk . red ( ` ${ JSON . stringify ( error . response ?. data ) } ` ) ) ;
116+ }
117+
118+ if ( error . response ?. status === 500 ) {
119+ console . log ( chalk . red ( ' Internal Server Error' ) ) ;
120+ }
121+ }
114122 console . log ( chalk . red ( ` ✕ ` ) + chalk . dim ( 'Unable to upload build scan' ) ) ;
115123 }
116124 }
You can’t perform that action at this time.
0 commit comments