Skip to content

Commit d85c12f

Browse files
committed
Ensure proper response is returned for FrontendError
1 parent 0abfe8a commit d85c12f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionReadTransaction.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ private TransactionWork<Void> handle( TestkitState testkitState, SessionHolder s
120120
{
121121
workThrowable = workThrowable.getCause();
122122
}
123+
if ( workThrowable instanceof FrontendError )
124+
{
125+
throw (FrontendError) workThrowable;
126+
}
123127
if ( workThrowable instanceof Neo4jException )
124128
{
125129
throw (Neo4jException) workThrowable;

testkit-backend/src/main/java/neo4j/org/testkit/backend/messages/requests/SessionWriteTransaction.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ private TransactionWork<Void> handle( TestkitState testkitState, SessionHolder s
123123
{
124124
workThrowable = workThrowable.getCause();
125125
}
126+
if ( workThrowable instanceof FrontendError )
127+
{
128+
throw (FrontendError) workThrowable;
129+
}
126130
if ( workThrowable instanceof Neo4jException )
127131
{
128132
throw (Neo4jException) workThrowable;

0 commit comments

Comments
 (0)