You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "n24q02m (via GitHub)" <gi...@apache.org> on 2026/10/06 01:36:05 UTC

Re: [PR] feat(api): return structured error code and hint for Cypher query failures [hugegraph]

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

   Pushed ca0ef9109:
   
   Success responses keep the old shape now — `errors` is annotated `@JsonInclude(NON_EMPTY)` so the key is only present on failures. `testSuccessResponseKeepsLegacyShape` parses the live success body with a strict `FAIL_ON_UNKNOWN_PROPERTIES` mapper, which is the same failure mode as `RestResult.readObject` in hugegraph-client — that test failed against the previous commit's shape.
   
   The SyntaxError routing was defeated by our own prefix-stripping: the class prefix was stripped before classification, so `no viable alternative at input ...` fell through to ExecutionError. Classification now runs on the exception class name and the full message first (translator `SyntaxException`/`ParseException` + ANTLR markers), prefix stripped afterwards for the returned message — covered for wrapped rethrows too.
   
   Agreed on the test point; the strict-parse test enforces the exact wire contract (no unknown top-level fields on success) without depending on client internals. build-server (memory/hbase/rocksdb) is green on the fix commit.
   


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org