mirror of
https://github.com/mempool/mempool.git
synced 2025-03-15 12:20:28 +01:00
handle null query in error log
This commit is contained in:
parent
08b68ef8ba
commit
29cbdf6cd5
1 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ import { execSync } from 'child_process';
|
||||||
}).then(result => {
|
}).then(result => {
|
||||||
resolve(result);
|
resolve(result);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
logger.debug(`database query "${query.slice(0, 100)}" failed!`);
|
logger.debug(`database query "${query?.slice(0, 100)}" failed!`);
|
||||||
reject(error);
|
reject(error);
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
|
@ -66,7 +66,7 @@ import { execSync } from 'child_process';
|
||||||
const pool = await this.getPool();
|
const pool = await this.getPool();
|
||||||
return pool.query(query, params);
|
return pool.query(query, params);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.debug(`database query "${query.slice(0, 100)}" failed!`);
|
logger.debug(`database query "${query?.slice(0, 100)}" failed!`);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue