surrealdb / surrealdb.go

SurrealDB SDK for Golang
https://surrealdb.com
Apache License 2.0
244 stars 66 forks source link

Bug: RPC errors logged, not gracefully handled #172

Closed TheRangiCrew closed 2 weeks ago

TheRangiCrew commented 2 weeks ago

Describe the bug

When a query fails, such as invalid syntax, an RPC error is returned. However, at the moment this is only logged to the terminal rather than returned as an error meaning there is no way to tell if a query failed on the database.

Steps to reproduce

Query the database with a query using incorrect syntax. The database will reject this and send back an RPC error logged in the terminal.

Expected behaviour

Any errors the database encounters should be returned to Send() so it can be returned and handled gracefully.

SurrealDB version

surreal 2.0.4

Contact Details

No response

Is there an existing issue for this?

Code of Conduct