tursodatabase/turso · error · TursoException
Remote response {Type} returned an empty result.
Error message
Remote response {Type} returned an empty result. What it means
A defensive guard in DeserializeResult: the result payload was present and non-null as JSON, but deserializing it into the target type returned null. For the reference types used here (RemoteStatementResult, RemoteBatchResult) that combination is effectively unreachable -- treat it as a binding or server bug rather than a configuration problem.
Source
Thrown at bindings/dotnet/src/Turso.Data/TursoRemoteClient.cs:555
}
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; } = "";
[JsonPropertyName("code")]
public string? Code { get; init; }
}
internal sealed class TursoRemoteSqlException(string message) : TursoException(message);View on GitHub (pinned to 244cde92a7)
Solutions
- Capture the full raw response body for the failing request.
- Reproduce the statement against a stock (cloud) instance to rule out a custom server.
- Update to the latest Turso.Data bindings in case the guard logic changed.
- File an issue with the raw payload -- this path indicates a defect, not misuse.
Defensive patterns
Strategy: try-catch
Try / catch
try { return await cmd.ExecuteReaderAsync(cancellationToken); }
catch (TursoException ex) when (ex.Message.Contains("returned an empty result"))
{
logger.LogError(ex, "Binding/server defect suspected; capture the raw envelope and report");
throw;
} Prevention
- Treat this guard as a defect indicator: capture the full raw response body when it fires.
- Keep bindings updated; guard logic evolves with releases.
- Verify against a stock cloud instance to rule out custom-server payloads.
- Include the payload in any issue you file.
When it happens
Trigger: Remote execute or batch execution where Result.Deserialize<T>() yields null despite a non-null JsonElement; only producible by pathological payloads (for example interning/custom converter behavior) or a bug in the bindings themselves.
Common situations: Almost never seen in practice; if it appears, it accompanies exotic JSON shapes from custom servers or nonstandard serialization middleware.
Related errors
- Unable to parse remote response: {ex.Message}
- Unable to parse remote {Type} response: {ex.Message}
- Remote request returned an empty response.
- Remote request returned an empty ok response.
- Remote response {Type} did not include a result.
AI-assisted analysis of tursodatabase/turso@244cde92a7 (2026-08-20).
Data as JSON: /api/errors/1ce8803e217c2434.
Report an issue: GitHub.