error handle
This commit is contained in:
@@ -5,7 +5,7 @@ import { FormsModule } from '@angular/forms';
|
|||||||
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
|
||||||
import { CartService, ApiService, LanguageService, AuthService } from '../../services';
|
import { CartService, ApiService, LanguageService, AuthService } from '../../services';
|
||||||
import { Item, CartItem, DeliveryOption } from '../../models';
|
import { Item, CartItem, DeliveryOption } from '../../models';
|
||||||
import { interval, of, Subscription } from 'rxjs';
|
import { EMPTY, interval, of, Subscription } from 'rxjs';
|
||||||
import { catchError, exhaustMap, take, timeout } from 'rxjs/operators';
|
import { catchError, exhaustMap, take, timeout } from 'rxjs/operators';
|
||||||
import { DeliverySelectorComponent } from '../../components/delivery-selector/delivery-selector.component';
|
import { DeliverySelectorComponent } from '../../components/delivery-selector/delivery-selector.component';
|
||||||
import { EmptyCartIconComponent } from '../../components/empty-cart-icon/empty-cart-icon.component';
|
import { EmptyCartIconComponent } from '../../components/empty-cart-icon/empty-cart-icon.component';
|
||||||
@@ -290,7 +290,8 @@ export class CartComponent implements OnDestroy {
|
|||||||
timeout(8000),
|
timeout(8000),
|
||||||
catchError((err) => {
|
catchError((err) => {
|
||||||
console.error('Error checking payment status:', err);
|
console.error('Error checking payment status:', err);
|
||||||
return of(null);
|
this.setPaymentError();
|
||||||
|
return EMPTY;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user