Class StreamWriteFailedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
co.ankatech.ankasecure.sdk.exception.AnkaSecureSdkException
co.ankatech.ankasecure.sdk.exception.StreamWriteFailedException
- All Implemented Interfaces:
Serializable
The request body could not be written to completion, so nothing was committed.
Why it is not an
It is deliberately unchecked, like its sibling
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 Summary
Constructors -
Method Summary
Methods inherited from class co.ankatech.ankasecure.sdk.exception.AnkaSecureSdkException
getContext, getErrorCode, getHttpStatus, getResponseBody, getRetryAfterSecondsMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
StreamWriteFailedException
- Parameters:
message- a description naming the operation, with no payload, key id or token fragmentcause- the writer's own failure, or the timeout that expired
-