File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,11 @@ const fetchWarningsForRuns = async (ids) => {
25
25
const data = await makeAPICall ( '/v1/warnings/' + id ) ;
26
26
if ( data ?. data ) warnings . push ( ...data . data ) ;
27
27
} catch ( err ) {
28
- showNotification ( 'Could not get warnings data from API' , err ) ;
28
+ if ( err instanceof APIEmptyResponse204 ) {
29
+ console . log ( 'No warnings where present in API response. Skipping error as this is allowed case.' )
30
+ } else {
31
+ showNotification ( 'Could not get warnings data from API' , err ) ;
32
+ }
29
33
}
30
34
}
31
35
return warnings ;
Original file line number Diff line number Diff line change @@ -593,8 +593,13 @@ const fetchAndFillWarnings = async (url_params) => {
593
593
warnings = await makeAPICall ( '/v1/warnings/' + url_params [ 'id' ] )
594
594
if ( ! warnings || warnings ?. data ?. length === 0 ) return ;
595
595
} catch ( err ) {
596
- showNotification ( 'Could not get warnings data from API' , err ) ;
596
+ if ( err instanceof APIEmptyResponse204 ) {
597
+ console . log ( 'No warnings where present in API response. Skipping error as this is allowed case.' )
598
+ } else {
599
+ showNotification ( 'Could not get warnings data from API' , err ) ;
600
+ }
597
601
return ;
602
+
598
603
}
599
604
600
605
const container = document . querySelector ( '#run-warnings' ) ;
You can’t perform that action at this time.
0 commit comments