File tree Expand file tree Collapse file tree 3 files changed +3
-24
lines changed
plugins/kibana_legacy/public/notify/lib Expand file tree Collapse file tree 3 files changed +3
-24
lines changed Original file line number Diff line number Diff line change 1818 */
1919
2020import { npSetup } from 'ui/new_platform' ;
21- import {
22- AngularHttpError ,
23- formatAngularHttpError ,
24- isAngularHttpError ,
25- } from '../../../../plugins/kibana_legacy/public' ;
26-
27- export function addFatalErrorCallback ( callback : ( ) => void ) {
28- npSetup . core . fatalErrors . get$ ( ) . subscribe ( ( ) => {
29- callback ( ) ;
30- } ) ;
31- }
21+ import { AngularHttpError , addFatalError } from '../../../../plugins/kibana_legacy/public' ;
3222
3323export function fatalError ( error : AngularHttpError | Error | string , location ?: string ) {
34- // add support for angular http errors to newPlatformFatalErrors
35- if ( isAngularHttpError ( error ) ) {
36- error = formatAngularHttpError ( error ) ;
37- }
38-
39- npSetup . core . fatalErrors . add ( error , location ) ;
24+ addFatalError ( npSetup . core . fatalErrors , error , location ) ;
4025}
Original file line number Diff line number Diff line change 1717 * under the License.
1818 */
1919
20- export { fatalError , addFatalErrorCallback } from './fatal_error' ;
20+ export { fatalError } from './fatal_error' ;
2121export { toastNotifications } from './toasts' ;
2222export { banners } from './banners' ;
Original file line number Diff line number Diff line change @@ -23,12 +23,6 @@ import {
2323 isAngularHttpError ,
2424} from './format_angular_http_error' ;
2525
26- export function addFatalErrorCallback ( fatalErrors : FatalErrorsSetup , callback : ( ) => void ) {
27- fatalErrors . get$ ( ) . subscribe ( ( ) => {
28- callback ( ) ;
29- } ) ;
30- }
31-
3226export function addFatalError (
3327 fatalErrors : FatalErrorsSetup ,
3428 error : AngularHttpError | Error | string ,
You can’t perform that action at this time.
0 commit comments