add catchError fallback for non-critical services API requests
This commit is contained in:
parent
2133356047
commit
c93aa4d82c
@ -136,7 +136,12 @@ export class BlockPreviewComponent implements OnInit, OnDestroy {
|
|||||||
return of(transactions);
|
return of(transactions);
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
this.stateService.env.ACCELERATOR === true && block.height > 819500 ? this.servicesApiService.getAccelerationHistory$({ blockHeight: block.height }) : of([])
|
this.stateService.env.ACCELERATOR === true && block.height > 819500
|
||||||
|
? this.servicesApiService.getAccelerationHistory$({ blockHeight: block.height })
|
||||||
|
.pipe(catchError(() => {
|
||||||
|
return of([]);
|
||||||
|
}))
|
||||||
|
: of([])
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
@ -345,7 +345,12 @@ export class BlockComponent implements OnInit, OnDestroy {
|
|||||||
return of(null);
|
return of(null);
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
this.stateService.env.ACCELERATOR === true && block.height > 819500 ? this.servicesApiService.getAccelerationHistory$({ blockHeight: block.height }) : of([])
|
this.stateService.env.ACCELERATOR === true && block.height > 819500
|
||||||
|
? this.servicesApiService.getAccelerationHistory$({ blockHeight: block.height })
|
||||||
|
.pipe(catchError(() => {
|
||||||
|
return of([]);
|
||||||
|
}))
|
||||||
|
: of([])
|
||||||
]);
|
]);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user