import { HttpErrorResponse } from '@angular/common/http'; import { EventEmitter } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { Observable } from 'rxjs'; import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/map'; import { NotificationService } from '../../notification'; import { EnvironmentService } from '../../services/environment.service'; export declare class ErrorService { private readonly notificationService; private readonly translate; unauthorizedError$: EventEmitter; /** * This variable defines, if the notification is needed. */ private readonly showNotifications; /** * The title of the common error. It stores the translated value. */ private commonErrorTitle; /** * The message of the common error. It stores the translated value. */ private commonErrorMessage; /** * The messages of the errors. It stores the translated values. */ private readonly errors; constructor(environmentService: EnvironmentService, notificationService: NotificationService, translate: TranslateService); /** * This function also can be used by 3rd party plugins, to handle the core's response transformer's errors. Typical .catch() handler. * @param errorResponse The Response, that contains the errors. * @param caught The error object? */ errorHandling(errorResponse: HttpErrorResponse, caught?: Observable): Observable; /** * Sends a common error notification. * * @memberof ErrorService */ commonoError(): void; /** * This function populates the error messages and arrays with the translations. */ setTranslations(): void; private backendErrorHandling; private errorStatusHandling; }