Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
3.0.0
-
None
-
1
Description
For a bad query, "SELECT 1=", the context is returned in the exception with a ToString(), but the JSON formatting is encoded and probably shouldn't be. For this example:
Couchbase.Core.Exceptions.ParsingFailureException: Exception of type 'Couchbase.Core.Exceptions.ParsingFailureException' was thrown.
|
at Couchbase.Query.QueryResultExtensions.ThrowExceptionOnError[T](IQueryResult`1 result, QueryErrorContext context) in /Users/ingenthr/src/couchbase-net-client/src/Couchbase/Query/QueryResultExtensions.cs:line 56
|
at Couchbase.Query.QueryClient.ExecuteQuery[T](QueryOptions options, ITypeSerializer serializer) in /Users/ingenthr/src/couchbase-net-client/src/Couchbase/Query/QueryClient.cs:line 188
|
at Couchbase.Query.QueryClient.QueryAsync[T](String statement, QueryOptions options) in /Users/ingenthr/src/couchbase-net-client/src/Couchbase/Query/QueryClient.cs:line 67
|
at Couchbase.Cluster.<>c__DisplayClass27_0`1.<<QueryAsync>g__Func|0>d.MoveNext() in /Users/ingenthr/src/couchbase-net-client/src/Couchbase/Cluster.cs:line 271
|
--- End of stack trace from previous location where exception was thrown ---
|
at Couchbase.Core.Retry.RetryOrchestrator.RetryAsync[T](Func`1 send, IRequest request) in /Users/ingenthr/src/couchbase-net-client/src/Couchbase/Core/Retry/RetryOrchestrator.cs:line 51
|
at Couchbase.Cluster.QueryAsync[T](String statement, QueryOptions options) in /Users/ingenthr/src/couchbase-net-client/src/Couchbase/Cluster.cs:line 274
|
at couchbase_net_testproj.Program.RunTest() in /Users/ingenthr/src/couchbase-net-testproj/Program.cs:line 64
|
-----------------------Context Info---------------------------
|
{"Statement":"[{\"statement\":\"SELECT 1=\",\"timeout\":\"75000ms\",\"$type\":\"airline\",\"client_context_id\":\"440c381b-aa94-4c5d-92b4-6581d80e53a7\"}]","ClientContextId":"440c381b-aa94-4c5d-92b4-6581d80e53a7","Parameters":"{\"Named\":{\"type\":\"airline\"},\"Raw\":{},\"Positional\":[]}","HttpStatus":400,"QueryStatus":6,"Errors":[{"msg":"syntax error - at end of input","Code":3000,"Name":null,"Severity":0,"Temp":false}],"Message":null}
|
The initial work was resolved under NCBC-2168.
Attachments
Issue Links
- is duplicated by
-
NCBC-2439 improve formatting on exception context
- Resolved