Skip to content

stub.withWaitForReady()'s DEADLINE_EXECEEDED lacks connection failure information #10749

@mohit-0109

Description

@mohit-0109
try {
  stub.withWaitForReady().withDeadline().hello();
} catch(StatusRuntimeException e) {
  // always receiving DEADLINE_EXCEEDED as status code if server is unavailable or client certs are invalid
}

There is no way to distinguish the underlying cause of failure , say if the failure is due to SSLHanshake or server genuinely not being available.

As an alternative, without using withWaitForReady() we are receiving UNAVAILABLE code in StatusRuntimeException which wraps the underlying cause say for example the SSLHandshake exception. Looking at the UNAVAILABLE code how can we safely take a call if we to reattempt connection, as we do not want to reattempt the connection in SSLException scenarios?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions