stargate / data-api

JSON document API for Apache Cassandra (formerly known as JSON API)
https://stargate.io
Apache License 2.0
13 stars 16 forks source link

Unmapped `AllNodesFailedException` (`SERVER_UNHANDLED_ERROR`): `com.datastax.oss.driver.api.core.DriverTimeoutException` not handled #1205

Closed tatu-at-datastax closed 3 months ago

tatu-at-datastax commented 3 months ago

Currently ThrowableToErrorMapper method handleAllNodesFailedException seems to recognize certain exception types:

but not DriverTimeoutException. This seems to be thrown for some Auth failures:

 com.datastax.oss.driver.api.core.AllNodesFailedException: Could not reach any contact point, make sure you've provided valid addresses (showing first 1 nodes, use getAllErrors() for more): Node(endPoint=/127.0.0.1:9042, hostId=null, hashCode=36dd5fa9): 
[com.datastax.oss.driver.api.core.DriverTimeoutException: [b415a6c5-5282-4ca5-a243-27db3206009e|control|id: 0x5a2fc19f, L:/127.0.0.1:58394 - R:/127.0.0.1:9042]
 Protocol initialization request, step 3 (AUTH_RESPONSE): timed out after 5000 ms]
    at com.datastax.oss.driver.api.core.AllNodesFailedException.copy(AllNodesFailedException.java:141)

so we should probably map it to some known ErrorCode.

jeffreyscarpenter commented 3 months ago

@tatu-at-datastax is this getting mapped to SERVER_UNHANDLED_ERROR?

tatu-at-datastax commented 3 months ago

@jeffreyscarpenter yes. Updated the title.