QueryHttpClient reads a non-2xx response's plain-text body with response.text().await.unwrap_or_default() in six places in src/query.rs (submit, status, results, cancel, and the other HttpRequestFailed arms). When the body read itself fails — connection dropped mid-body, truncated response — the error is discarded and the caller sees an error whose response_body is empty, as if the runtime had returned no explanation. The underlying transport failure is lost.
search() was brought in line in #84:
let response_body = match response.text().await {
Ok(body) => body.trim().to_string(),
Err(e) => format!("<error body could not be read: {e}>"),
};
The remaining six call sites still use unwrap_or_default(). They should use the same shape — most likely factored into one helper on QueryHttpClient so a future call site cannot miss it, mirroring how redirect::credentialed_client_builder centralises the redirect policy.
Raised by review feedback on #84; deferred there because changing the other six sites is outside that PR's scope.
QueryHttpClientreads a non-2xx response's plain-text body withresponse.text().await.unwrap_or_default()in six places insrc/query.rs(submit, status, results, cancel, and the otherHttpRequestFailedarms). When the body read itself fails — connection dropped mid-body, truncated response — the error is discarded and the caller sees an error whoseresponse_bodyis empty, as if the runtime had returned no explanation. The underlying transport failure is lost.search()was brought in line in #84:The remaining six call sites still use
unwrap_or_default(). They should use the same shape — most likely factored into one helper onQueryHttpClientso a future call site cannot miss it, mirroring howredirect::credentialed_client_buildercentralises the redirect policy.Raised by review feedback on #84; deferred there because changing the other six sites is outside that PR's scope.