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); |                   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