-
Notifications
You must be signed in to change notification settings - Fork 157
Description
Hi,
I'm trying to debug a potential issue in neo4j-ogm that might be related to Bolt session handling after a server restart (see also: spring-projects/spring-data-neo4j#373). Before going any further, I have a doubt concerning the Java Driver:
-
For plaintext connections, the first operation after the restart results in a
ServiceUnavailableExceptionwith the following message:"Connection terminated while receiving data. This can happen due to network instabilities, or due to restarts of the database."
-
For TLS-enabled connections, the first operation after the restart results in a
ClientExceptionwith exactly the same message.
My question is, why are there two different exceptions instead of just using ServiceUnavailableException for both?
Just FYI, neo4j-ogm doesn't handle ServiceUnavailableException yet. It just wraps ClientExceptions coming from server disconnections or network glitches in CypherException, so the library user has to catch them and reconnect manually, invoking a new query.