Skip to content

TINKERPOP-3238 Throw FailResponseException for fail() step over remote#3460

Open
spmallette wants to merge 1 commit into
3.7-devfrom
TINKERPOP-3238
Open

TINKERPOP-3238 Throw FailResponseException for fail() step over remote#3460
spmallette wants to merge 1 commit into
3.7-devfrom
TINKERPOP-3238

Conversation

@spmallette

@spmallette spmallette commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/TINKERPOP-3238

The Java driver now throws a FailResponseException, a subclass of ResponseException that implements Failure, when the server returns a SERVER_ERROR_FAIL_STEP (595) status code. This makes remote handling of the fail() step more consistent with embedded behavior.

Failure.format() is guarded against null traversal/traverser context since that data is not transmitted from the server, preventing a NullPointerException when formatting a remotely-reconstructed Failure.

Adds unit tests for both the defensive format() logic and the new exception, plus documentation in the reference and upgrade guides.

@kenhuuu could you say what this change means in 4.0? I don't know that we have the same kind of Exception hierarchy there anymore iirc

VOTE +1

The Java driver now throws a FailResponseException, a subclass of
ResponseException that implements Failure, when the server returns a
SERVER_ERROR_FAIL_STEP (595) status code. This makes remote handling of
the fail() step more consistent with embedded behavior.

Failure.format() is guarded against null traversal/traverser context
since that data is not transmitted from the server, preventing a
NullPointerException when formatting a remotely-reconstructed Failure.

Adds unit tests for both the defensive format() logic and the new
exception, plus documentation in the reference and upgrade guides.

Assisted-by: Claude Code:claude-opus-4-8
@kenhuuu

kenhuuu commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

could you say what this change means in 4.0? I don't know that we have the same kind of Exception hierarchy there anymore iirc

we still use ResponseException and could probably do something very similar to what is done here. We don't have that same error code anymore but we do get a "ServerFailStepException" as the exception type in the response so we'd use that as the conditional instead.

@kenhuuu

kenhuuu commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

VOTE +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants