n24q02m commented on PR #3241:
URL: https://github.com/apache/hugegraph/pull/3241#issuecomment-6160161458

   Thanks for the detailed evidence. I rebased onto current master and pushed 
`16cd32e`; `CypherApiTest` passes (28 tests, 0 failures) against a real 
RocksDB-backed server on JDK 17.
   
   - **`errors` on successful responses:** fixed. The field is now 
`@JsonInclude(NON_EMPTY)`, so a successful `/cypher` response is byte-for-byte 
the legacy shape. `testSuccessResponseKeepsLegacyShape` asserts there is no 
`errors` key and parses the body with `FAIL_ON_UNKNOWN_PROPERTIES` enabled.
   - **Parse errors labelled `ExecutionError`:** the mapper now checks the 
exception class and message (`SyntaxException`, `ParseException`, `mismatched 
input`, `Invalid input '...'`, and similar) before the generic path, so parse 
failures return `HugeGraph.Cypher.SyntaxError`. A new test, 
`testParseErrorIsClassifiedAsSyntaxError`, posts a real parse error (`MATCH 
(n:person RETURN n`) and asserts the `HugeGraph.Cypher.SyntaxError` code and 
its hint. Running it showed the server reports this case as `Invalid input 'R': 
expected ...`, which the first version of the mapper missed; that is fixed in 
`16cd32e`.
   - **`MISSING_PARAMETER` and the `?parameters=` hint:** removed from 
`CypherErrorMapper`, as you suggested. The API does not accept parameters yet, 
so the hint was misleading. A reference to an undeclared `$param` now falls 
through to the generic variable hint.
   - **Still open:** I have not matched the `Expected exactly one statement` 
and `Unknown function` messages from your list individually, so they still get 
the generic classification. On failures the body still carries a top-level 
`errors`; if you prefer `status.attributes` there, say so and I will switch.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to