node-mysql2
node-mysql2 copied to clipboard
Fix error code for protocol error
The error code emitted for ER_CLIENT_INTERACTION_TIMEOUT is "4031" instead of the expected "ER_CLIENT_INTERACTION_TIMEOUT", this fixes that.
cc @wellwelwel bump on this
cc @wellwelwel bump on this
@KunZhou-at, thank you for your many contributions 💙
This one in particular I couldn't figure out what the issue was and what the solution does. Could you please show a failure that occurs without your fix?
More personally, when I see that no tests have been changed and a new test covers a failure, I usually merge the PRs. When I don't understand or I realize a decision would need to be taken, I usually leave it to @sidorares and also to the community 🤝
@wellwelwel I believe error.code is a number in the current code for ER_CLIENT_INTERACTION_TIMEOUT but we have always propagated the error.code to the client as a string elsewhere (for other errors). So this seems to be inconsistent behavior.
@wellwelwel Closing since it's not getting attention. Feel free to open and I can resolve the conflicts if that changes.