UNPKG

@rxap/ngx-error

Version:

This package provides a comprehensive error handling solution for Angular applications, including interceptors, services, and UI components to display different types of errors in a user-friendly dialog. It supports handling of generic errors, HTTP errors

28 lines (27 loc) 1.33 kB
import { ErrorHandler, InjectionToken, StaticProvider } from '@angular/core'; import * as Sentry from '@sentry/angular'; import { AngularErrorDialogData } from './error/angular-error-dialog-data'; import { OpenApiHttpResponseErrorDialogData } from './open-api-http-response-error/open-api-http-response-error-dialog-data'; import * as i0 from "@angular/core"; export interface ErrorHandlerOptions { logErrors?: boolean; showDialog?: boolean; sentry?: { showDialog?: boolean; dialogOptions?: Sentry.ReportDialogOptions; }; } export declare const RXAP_ERROR_HANDLER_OPTIONS: InjectionToken<ErrorHandlerOptions>; export declare class RxapErrorHandler implements ErrorHandler { protected readonly options: ErrorHandlerOptions; protected readonly injector: import("@angular/core").Injector; /** * Method called for every value captured through the ErrorHandler */ handleError(errorCandidate: unknown): void; protected showOpenApiHttpResponseErrorDialog(data: OpenApiHttpResponseErrorDialogData): void; protected showAngularErrorDialog(data: AngularErrorDialogData): void; static ɵfac: i0.ɵɵFactoryDeclaration<RxapErrorHandler, never>; static ɵprov: i0.ɵɵInjectableDeclaration<RxapErrorHandler>; } export declare function ProvideErrorHandler(): StaticProvider;