UNPKG

1.04 kBTypeScriptView Raw
1import { ErrorHandlingStrategy } from './types/http-request-handler';
2export declare class HttpRequestErrorHandler {
3 /**
4 * Logger Class
5 *
6 * @type {*}
7 * @memberof HttpRequestErrorHandler
8 */
9 logger: any;
10 /**
11 * Error Service Class
12 *
13 * @type {*}
14 * @memberof HttpRequestErrorHandler
15 */
16 httpRequestErrorService: any;
17 /**
18 * @var strategy Request timeout
19 *
20 * @memberof HttpRequestHandler
21 */
22 strategy: ErrorHandlingStrategy;
23 /**
24 * @var noThrowStrategies List of strategies excluded from error throwing
25 *
26 * @memberof HttpRequestHandler
27 */
28 noThrowStrategies: ErrorHandlingStrategy[];
29 constructor(logger: any, httpRequestErrorService: any, strategy: ErrorHandlingStrategy);
30 /**
31 * Process and Error
32 *
33 * @param {*} error Error instance or message
34 * @throws Request error context
35 * @returns {void}
36 */
37 process(error: string | Error): void;
38}