Options
All
  • Public
  • Public/Protected
  • All
Menu

Intercepts and handles errors from outgoing HTTP request.

Hierarchy

  • ErrorInterceptor

Implements

  • HttpInterceptor

Index

Constructors

Methods

Constructors

constructor

  • Initialization of the error interceptor.

    Parameters

    • errorDialogService: ErrorDialogService

      A service that provides a dialog box for displaying errors to the user.

    • loggingService: LoggingService

      A service that provides logging capabilities.

    • router: Router

      A service that provides navigation among views and URL manipulation capabilities.

    Returns ErrorInterceptor

Methods

intercept

  • intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>
  • Intercepts HTTP requests.

    Parameters

    • request: HttpRequest<unknown>

      An outgoing HTTP request with an optional typed body.

    • next: HttpHandler

      The next HTTP handler or the outgoing request dispatcher.

    Returns Observable<HttpEvent<unknown>>

    The error caught from the request.

Generated using TypeDoc