ynkap-payment
Version:
Module de paiement Y-Nkap pour Angular - Intégration simple des paiements mobiles (Orange Money, MTN Mobile Money)
29 lines (28 loc) • 1.14 kB
TypeScript
import { Observable } from 'rxjs';
import { RetryOptions, YnkapError } from './models/error.model';
import * as i0 from "@angular/core";
export declare class ErrorHandlingService {
private errorSubject;
private defaultRetryOptions;
constructor();
handleError(error: any): void;
getError(): Observable<YnkapError | null>;
clearError(): void;
/**
* Apply retry logic with exponential backoff for failed operations
* @param error The error that occurred
* @param retryFn Function to retry
* @param options Retry options
* @returns An observable that will retry the operation
*/
retryWithBackoff<T>(error: YnkapError, retryFn: () => Observable<T>, options?: Partial<RetryOptions>): Observable<T>;
/**
* Convert any error to a standardized YnkapError
* @param error The error to convert
* @param context Optional context information
* @returns A standardized YnkapError
*/
private convertToYnkapError;
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorHandlingService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<ErrorHandlingService>;
}