Class IntakeServiceException

All Implemented Interfaces:
Serializable

public class IntakeServiceException extends IntakeException
A failure that originates beyond the request shape — resolving datasource config, authenticating the API key, or proxying the body to repository-service.

The cause carries the real gRPC/REST failure for server-side logging; the client only ever sees the mapped IntakeErrorCode and a curated message. The fromUpstream factory is the single place that translates a dependency's failure into a client-safe code, so no upstream message can leak from any call site.

See Also:
  • Constructor Details

  • Method Details

    • internal

      public static IntakeServiceException internal(String clientMessage, Throwable cause)
      An internal fault in the intake service itself (misconfig, bug, invariant break).
    • of

      public static IntakeServiceException of(IntakeErrorCode code, Throwable cause)
      A code with its default safe message, preserving the cause for logging.
    • fromUpstream

      public static IntakeServiceException fromUpstream(Throwable t)
      Translate any failure thrown while resolving config or proxying the upload into a client-safe intake error. Centralizes gRPC- and REST-status mapping so no upstream message reaches the wire.
    • fromUpstreamHttpStatus

      public static IntakeServiceException fromUpstreamHttpStatus(int status)
      Map a non-2xx HTTP status returned by repository-service to a client code, so the upstream's own error body is never forwarded to the caller.