Improve some logger error messages.

This commit is contained in:
softsimon 2020-10-15 11:12:33 +07:00
parent 86c654f22f
commit 472b1d35c2
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
4 changed files with 3 additions and 4 deletions

View File

@ -133,7 +133,7 @@ class Bisq {
private updatePrice() { private updatePrice() {
request('https://markets.bisq.network/api/trades/?market=bsq_btc', { json: true }, (err, res, trades: BisqTrade[]) => { 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[] = []; const prices: number[] = [];
trades.forEach((trade) => { trades.forEach((trade) => {

View File

@ -22,7 +22,7 @@ class FiatConversion {
private updateCurrency() { private updateCurrency() {
request('https://api.opennode.co/v1/rates', { json: true }, (err, res, body) => { 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) { if (body && body.data) {
this.tickers = body.data; this.tickers = body.data;
} }

View File

@ -107,7 +107,7 @@ class WebsocketHandler {
client.send(JSON.stringify(response)); client.send(JSON.stringify(response));
} }
} catch (e) { } catch (e) {
logger.err(e); logger.err('Error parsing websocket message: ' + e);
} }
}); });
}); });

View File

@ -21,7 +21,6 @@ export async function checkDbConnection() {
connection.release(); connection.release();
} catch (e) { } catch (e) {
logger.err('Could not connect to database.'); logger.err('Could not connect to database.');
logger.err(e);
process.exit(1); process.exit(1);
} }
} }