Skip to content

Commit

Permalink
fix(mysql): preserve mysql error meta infomation
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Nov 9, 2020
1 parent f2854dd commit 22affc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/plugin-mysql/src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ export default class MysqlDatabase {
this.pool.query(sql, (err, results) => {
if (!err) return resolve(results)
logger.warn(sql)
error.stack = err.message + error.stack.slice(7)
reject(error)
err.stack = err.message + error.stack.slice(7)
reject(err)
})
})
}
Expand Down

0 comments on commit 22affc3

Please sign in to comment.