1 | import { OnInit, OnChanges } from '@angular/core';
|
2 | /**
|
3 | <api-error *ngIf="state.modifyError" [error]="state.modifyError"></api-error>
|
4 | */
|
5 | export interface IErrorApi {
|
6 | headers?: object;
|
7 | message?: string;
|
8 | ok?: boolean;
|
9 | status?: number;
|
10 | _body?: string;
|
11 | statusText?: string;
|
12 | type?: number;
|
13 | url?: string;
|
14 | }
|
15 | export declare class ApiErrorComponent implements OnInit, OnChanges {
|
16 | /** An error response passed by the API or the application */
|
17 | error: IErrorApi;
|
18 | /** An error response passed by the API or the application */
|
19 | message: string;
|
20 | /** Whether or not to show all the error details passed by the API. If false will only show the error.msg */
|
21 | showDetails: boolean;
|
22 | /** Array of keys in API error response */
|
23 | errorOfKeys: string[];
|
24 | errorMessage: string;
|
25 | /** API response keys to ignore */
|
26 | private ignoreProps;
|
27 | constructor();
|
28 | ngOnInit(): void;
|
29 | ngOnChanges(): void;
|
30 | createError(): void;
|
31 | /**
|
32 | * Hide alert message
|
33 | */
|
34 | closeAlert(): void;
|
35 | }
|