Return HTTP 503 from Fee Api when mempool is still syncing.
Fix for displaying git commit on About page.
This commit is contained in:
@@ -57,6 +57,11 @@ class Routes {
|
||||
}
|
||||
|
||||
public async getRecommendedFees(req: Request, res: Response) {
|
||||
if (!mempool.isInSync()) {
|
||||
res.statusCode = 503;
|
||||
res.send('Service Unavailable');
|
||||
return;
|
||||
}
|
||||
const result = feeApi.getRecommendedFee();
|
||||
res.json(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user