Skip to content

Commit e4fc336

Browse files
dhlinsiddontang
authored andcommitted
display friendly error message on handshake error (go-mysql-org#435)
1 parent f66c8b3 commit e4fc336

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (c *Conn) readInitialHandshake() error {
3434
}
3535

3636
if data[0] == ERR_HEADER {
37-
return errors.New("read initial handshake error")
37+
return errors.Annotate(c.handleErrorPacket(data), "read initial handshake error")
3838
}
3939

4040
if data[0] < MinProtocolVersion {

0 commit comments

Comments
 (0)