import { FatalErrorsSetup } from '../../../../../core/public' ; import { AngularHttpError , formatAngularHttpError , isAngularHttpError , } from './format_angular_http_error' ; export function addFatalError ( fatalErrors , error , location ? ) { if ( isAngularHttpError ( error ) ) { error = formatAngularHttpError ( error ) ; } fatalErrors . add ( error , location ) ; }