mirror of
https://github.com/mempool/mempool.git
synced 2024-11-19 09:52:14 +01:00
Merge pull request #5068 from mempool/mononaut/handle-services-outage
Fix error handling for non-critical services API requests
This commit is contained in:
commit
d32de4fa06
@ -136,7 +136,12 @@ export class BlockPreviewComponent implements OnInit, OnDestroy {
|
||||
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);
|
||||
})
|
||||
),
|
||||
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…
Reference in New Issue
Block a user