Class StreamWriteFailedException

All Implemented Interfaces:
Serializable

public final class StreamWriteFailedException extends AnkaSecureSdkException
The request body could not be written to completion, so nothing was committed.

Raised when a duplex upload's writer thread failed, or did not finish within the bounded await, before any output file is promoted. Under the duplex contract the request write happens on a writer thread and cannot throw out of writeTo, so this is the only way that failure reaches the calling thread — and the whole fail-closed guarantee for the four endpoints that carry no trailing verdict rests on it.

What it means

The server may have received a truncated request. Whatever it answered is not trustworthy as a transformation of the caller's input, so the destination file was left absent and the quarantine sidecar deleted. Retrying the whole operation is the correct response.

Why it is not an IOException

It is deliberately unchecked, like its sibling StreamIntegrityException: it must reach the caller unwrapped, and the streaming call path collapses every IOException into a generic API exception. Being outside that hierarchy is what preserves the type — a property worth more than the symmetry, because the type is how a caller tells a truncated upload from a server error.

The originating failure — the writer's own cause, or a TimeoutException when the bound expired — is always attached as Throwable.getCause().

See Also:
  • Constructor Details

    • StreamWriteFailedException

      public StreamWriteFailedException(String message, Throwable cause)
      Parameters:
      message - a description naming the operation, with no payload, key id or token fragment
      cause - the writer's own failure, or the timeout that expired