File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { getVarnamesFPCore } from './fpcore';
22import * as ordinals from './ordinals' ;
33import { ErrorExpressionResponse , Sample , LocalErrorTree } from '../HerbieTypes' ;
44import { getApi } from './servercalls' ;
5+ import { showErrorToast } from '../../ErrorToast' ;
56
67interface HerbieResponse {
78 error ?: string ;
@@ -84,7 +85,16 @@ const getHerbieApi = async (
8485 if ( responseData . error ) {
8586 throw new Error ( 'Herbie server: ' + responseData . error ) ;
8687 }
87- console . debug ( 'got data' , responseData ) ;
88+ const warnings = responseData . warnings
89+ console . log ( warnings )
90+ if ( warnings ) {
91+ for ( const [ type , message , link , details ] of warnings ) {
92+ showErrorToast (
93+ `Warning: ${ type } \nMessage: ${ message } \nDetails: ${ details . join ( ", " ) } \nMore info: ${ link } `
94+ ) ;
95+ }
96+ }
97+ console . log ( 'got data' , responseData ) ;
8898 return responseData ;
8999 } catch ( error : any ) {
90100 throw new Error ( `Error sending data to Herbie server at ${ url } :\n${ error . message } ` )
You can’t perform that action at this time.
0 commit comments