Possible bug parsing bookmarks

We are moving to version 5.28.9 of the Java driver and I have notice an inconsistency (maybe a bug) in the response when invalid bookmarks are removed

If I use FB:kcwQFYBpmIv+SNC72W (which I created from a valid bookmark with a few characters removed) I get a org.neo4j.driver.exceptions.ClientException with the code Neo.ClientError.Transaction.InvalidBookmark which is what I expect.

However if I use FB the exception is org.neo4j.driver.exceptions.DatabaseException: Range [3, 2) out of bounds for length 2 with a code Neo.DatabaseError.General.UnknownError

These are both invalid bookmarks so I shouldn’t the same ClientException be raised for both?

Thanks

If you want to parse a bookmark, you need to import neo4j-fabric available in the Neo4j installation.

You can write

QueryRouterBookmark bookmark = BookmarkFormat.parse("FB:kcwQRvtE86WcQk+xyU1q5u1+bMpyIXZ/kA=="); System.out.println("Database UUID" + bookmark.internalGraphStates().get(0).graphUuid()); System.out.println("Transaction ID " + bookmark.internalGraphStates().get(0).transactionId());