Skip to content

Commit db20492

Browse files
committed
Adjust suppression of retriable neo4j errors
1 parent 042ff8f commit db20492

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/core/database/cypher.factory.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,11 @@ export const CypherFactory: FactoryProvider<Connection> = {
9797
} else if (
9898
(level === LogLevel.WARNING &&
9999
message.includes('Failed to connect to server')) ||
100-
(level === LogLevel.ERROR &&
101-
message.includes(
102-
'experienced a fatal error {"code":"ServiceUnavailable","name":"Neo4jError"}',
103-
))
100+
(level === LogLevel.ERROR && message.includes('"retriable":true'))
104101
) {
105-
// Change connection failure messages to debug.
106-
// Connection failures are thrown so they will get logged
107-
// in exception handling (if they are not handled, i.e. retries/transactions).
102+
// Change retriable failure messages to debug.
103+
// These errors, like connection failures, will ultimately be thrown
104+
// (and logged that way) after retries are exhausted.
108105
// Otherwise, these are misleading as they aren't actual problems.
109106
driverLogger.log(LogLevel.DEBUG, message);
110107
} else {

0 commit comments

Comments
 (0)