mirror of
https://github.com/mempool/mempool.git
synced 2025-03-13 19:37:47 +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 => {
|
||||
resolve(result);
|
||||
}).catch(error => {
|
||||
logger.debug(`database query "${query.slice(0, 100)}" failed!`);
|
||||
logger.debug(`database query "${query?.slice(0, 100)}" failed!`);
|
||||
reject(error);
|
||||
}).finally(() => {
|
||||
clearTimeout(timer);
|
||||
|
@ -66,7 +66,7 @@ import { execSync } from 'child_process';
|
|||
const pool = await this.getPool();
|
||||
return pool.query(query, params);
|
||||
} catch (e) {
|
||||
logger.debug(`database query "${query.slice(0, 100)}" failed!`);
|
||||
logger.debug(`database query "${query?.slice(0, 100)}" failed!`);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue