mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 05:12:35 +01:00
Improve some logger error messages.
This commit is contained in:
parent
86c654f22f
commit
472b1d35c2
@ -133,7 +133,7 @@ class Bisq {
|
||||
|
||||
private updatePrice() {
|
||||
request('https://markets.bisq.network/api/trades/?market=bsq_btc', { json: true }, (err, res, trades: BisqTrade[]) => {
|
||||
if (err) { return logger.err(err); }
|
||||
if (err) { return logger.err('Error updating Bisq market price: ' + err); }
|
||||
|
||||
const prices: number[] = [];
|
||||
trades.forEach((trade) => {
|
||||
|
@ -22,7 +22,7 @@ class FiatConversion {
|
||||
|
||||
private updateCurrency() {
|
||||
request('https://api.opennode.co/v1/rates', { json: true }, (err, res, body) => {
|
||||
if (err) { return logger.err(err); }
|
||||
if (err) { return logger.err('Error updating currency from OpenNode: ' + err); }
|
||||
if (body && body.data) {
|
||||
this.tickers = body.data;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ class WebsocketHandler {
|
||||
client.send(JSON.stringify(response));
|
||||
}
|
||||
} catch (e) {
|
||||
logger.err(e);
|
||||
logger.err('Error parsing websocket message: ' + e);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -21,7 +21,6 @@ export async function checkDbConnection() {
|
||||
connection.release();
|
||||
} catch (e) {
|
||||
logger.err('Could not connect to database.');
|
||||
logger.err(e);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user