Skip to content

Commit d99923c

Browse files
authored
Merge pull request #419 from Lujeni/master
Display the build query error instead of generic message
2 parents 166dbe2 + 7732f81 commit d99923c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

connection.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"crypto/tls"
55
"encoding/binary"
66
"encoding/json"
7+
"fmt"
78
"net"
89
"sync"
910
"sync/atomic"
@@ -189,7 +190,7 @@ func (c *Connection) sendQuery(q Query) error {
189190
// Build query
190191
b, err := json.Marshal(q.Build())
191192
if err != nil {
192-
return RQLDriverError{rqlError("Error building query")}
193+
return RQLDriverError{rqlError(fmt.Sprintf("Error building query: %s", err.Error()))}
193194
}
194195

195196
// Set timeout

0 commit comments

Comments
 (0)