tursodatabase/turso · error · TursoException

Remote response {Type} did not include a result.

Error message

Remote response {Type} did not include a result.

What it means

An inner pipeline response object (type "execute" or "batch") did not carry a result payload: its "result" property was absent or an explicit JSON null. DeserializeResult guards this before converting, so the server sent an execute/batch acknowledgment without the data the client needs to build a reader.

Source

Thrown at bindings/dotnet/src/Turso.Data/TursoRemoteClient.cs:550

    [JsonPropertyName("response")]
    public RemoteStreamResponse? Response { get; init; }

    [JsonPropertyName("error")]
    public RemoteError? Error { get; init; }
}

internal sealed class RemoteStreamResponse
{
    [JsonPropertyName("type")]
    public string Type { get; init; } = "";

    [JsonPropertyName("result")]
    public JsonElement Result { get; init; }

    public T DeserializeResult<T>()
    {
        if (Result.ValueKind is JsonValueKind.Undefined or JsonValueKind.Null)
            throw new TursoException($"Remote response {Type} did not include a result.");

        try
        {
            return Result.Deserialize<T>()
                   ?? throw new TursoException($"Remote response {Type} returned an empty result.");
        }
        catch (JsonException ex)
        {
            throw new TursoException($"Unable to parse remote {Type} response: {ex.Message}");
        }
    }
}

internal sealed class RemoteError
{
    [JsonPropertyName("message")]
    public string Message { get; init; } = "";

View on GitHub (pinned to 244cde92a7)

Solutions

  1. Inspect the raw envelope and confirm the result field is missing or null for the failing statement.
  2. Test the same SQL as a standalone command against a known-good instance.
  3. Align server and bindings versions.
  4. Remove field-stripping intermediaries from the path.
  5. Report the statement and raw envelope if current versions still omit the result.
Defensive patterns

Strategy: try-catch

Try / catch

try { return await cmd.ExecuteReaderAsync(cancellationToken); }
catch (TursoException ex) when (ex.Message.Contains("did not include a result"))
{
    logger.LogError(ex, "Server omitted result payload for {Sql}", cmd.CommandText);
    throw;
}

Prevention

When it happens

Trigger: Remote command or batch execution where response.Results[0].Response.Type is "execute"/"batch" but the Result JsonElement is Undefined or Null -- the JSON lacked "result" or set it to null.

Common situations: Servers that omit result for statements they classify as no-output; serializers dropping null fields at a gateway; version drift in the response schema; server bugs on specific statement shapes.

Related errors


AI-assisted analysis of tursodatabase/turso@244cde92a7 (2026-08-20). Data as JSON: /api/errors/657cacf0e29072fc. Report an issue: GitHub.