On this page

UnsupportedRemoteFormResponseError

Trace a recognized form envelope whose result payload SER cannot consume.

What this error means and what can trigger it

UnsupportedRemoteFormResponseError means the response passed SER's top-level envelope check as type: "result", but the result branch cannot supply a usable decoded payload. The class retains the original value in envelope and is nested in RemoteTransportError.cause.

Two response shapes trigger it. The envelope may omit both supported encoded slots, result and data; alternatively, one of those strings may parse with devalue but produce a value that fails SER's payload schema. That schema accepts an optional issue array and result value, with issue paths made only from string or numeric segments.

Invalid devalue syntax takes a different path because the parser throws before this class can be constructed. The outer Promise normalization then handles that parser error as a transport failure.

Exactly where it triggers

Missing encoded result slot:

const serialized = response.result ?? response.data;

if (serialized === undefined) {
	throw create_remote_transport_error(new UnsupportedRemoteFormResponseError(envelope), envelope);
}

Decoded value does not match the result payload schema:

const decoded = decode_form_result_payload(parsed);

if (!decoded) {
	throw create_remote_transport_error(new UnsupportedRemoteFormResponseError(envelope), envelope);
}

For reference, the class itself is declared at modules/svelte-effect-runtime/src/errors.ts L699 @ C14.

Why this is the case

Recognizing the envelope's discriminator proves that the server intended a result response. It does not prove that the client can extract a result from it. Separating this case from InvalidRemoteFormResponseError pinpoints version skew and payload-contract changes after the top-level protocol has already succeeded.

SER validates the decoded value before reading issues or results from it. That check prevents arbitrary devalue output from being treated as validation data and gives the transport boundary one controlled failure shape.