Skip to content

Commit 80a5bc9

Browse files
Nighelles DavidNighelles David
authored andcommitted
Fixing error message for 2.3 driver and 2.2 server
Review by @josh
1 parent d3023bd commit 80a5bc9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

net.coffee

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,10 @@ class TcpConnection extends Connection
11091109
j = i+1
11101110
status_str = status_buf.toString()
11111111
# Get the reply from the server, and parse it as JSON
1112-
server_reply = JSON.parse(status_str)
1112+
try
1113+
server_reply = JSON.parse(status_str)
1114+
catch json_error
1115+
throw new err.ReqlDriverError(status_str)
11131116

11141117
if state is 1
11151118
if not server_reply.success

0 commit comments

Comments
 (0)