You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log
Error: Error: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'xxx.xxx.xxx.xxx' (using password: YES)
// ++ Stack trace omitted ++
You can see the original Error thrown by mysql.js appears to have been stringified, and then re-thrown within another Error by serverless-mysql, losing the helpful MysqlError object that can be interrogated programmatically.
Is this a bug? How can we get the code, errno, etc. out of the error thrown by serverless-mysql?
The text was updated successfully, but these errors were encountered:
I can see in our application logs that some errors thrown by serverless-mysql do seem to include the whole MysqlError object - specifically when the error code in question is ECONNRESET however I don't know how to reproduce that locally.
ChrsWoo
changed the title
Errors are inconsistent and don't match those thrown my mysql.js
Errors are inconsistent and don't match those thrown by mysql.js
Sep 6, 2021
Good afternoon, I hope this isn't a duplicate.
While attempting to debug an error, we noticed that the errors being thrown by the
query()
were not providing us with the information we expected.To illustrate, I've produced an
ER_ACCESS_DENIED_ERROR
error locally with both serverless-mysql and mysql.js.Outputs:
By contrast;
Outputs;
You can see the original Error thrown by mysql.js appears to have been stringified, and then re-thrown within another Error by serverless-mysql, losing the helpful MysqlError object that can be interrogated programmatically.
Is this a bug? How can we get the
code
,errno
, etc. out of the error thrown by serverless-mysql?The text was updated successfully, but these errors were encountered: