Class StatusCodes

java.lang.Object
io.github.flink.gcp.connector.base.rpc.StatusCodes

@Internal public final class StatusCodes extends Object
Extraction of gRPC status codes from the exceptions the Google Cloud clients surface.
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.google.api.gax.rpc.StatusCode.Code
    codeOf(Throwable throwable)
    Returns the status code the given throwable itself carries — from the gax ApiException the client libraries surface, or from a raw gRPC StatusRuntimeException (defense in depth) — or null when it carries none.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • codeOf

      @Nullable public static com.google.api.gax.rpc.StatusCode.Code codeOf(Throwable throwable)
      Returns the status code the given throwable itself carries — from the gax ApiException the client libraries surface, or from a raw gRPC StatusRuntimeException (defense in depth) — or null when it carries none.

      Only the given throwable is inspected. Walking a cause chain, and deciding which element of it classifies the failure, stays with the caller (typically ExceptionUtils.findThrowable): retryability classification is per-connector policy.