Class PqcTransportException

All Implemented Interfaces:
Serializable

public final class PqcTransportException extends AnkaSecureSdkException
A request under PQC transport was refused by the SDK, either because the response cannot be trusted as the server's answer, or because completing it would take a route that PQC transport does not protect and the caller did not choose that route.

With pqc.transport.enabled=true every response to a wrapped request is one of two things: a body encrypted under the session key (application/octet-stream, whatever its status), or a plaintext RFC 9457 problem (application/problem+json) on an error status, written before the transport layer could encrypt anything. Anything else is refused rather than handed to the caller as if it had been decrypted: a plaintext body on an encrypted channel is exactly what a tampering or misrouting intermediary would produce, and accepting it would silently remove the protection the caller enabled.

The streaming routes are protected by TLS only. Under PQC transport the SDK never chooses one on its own, whatever a size limit or a refusal suggests: PqcTransportException.Reason.STREAMING_NOT_CHOSEN names the streaming operation the caller can call explicitly.

Unchecked, like Http2RequiredException: it is raised from an OkHttp interceptor or from an operation's route selection and must reach the caller through the catch (ApiException | IOException) arms of the service layer unchanged. A refused response carries SdkErrorCode.IO, the code that failure carried before it was typed; a route the SDK will not choose carries SdkErrorCode.UNKNOWN, like the other client-side transport refusals. The message never carries a response body.

See Also: