handle null query in error log
This commit is contained in:
		
							parent
							
								
									08b68ef8ba
								
							
						
					
					
						commit
						29cbdf6cd5
					
				| @ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user