You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That error is a symptom of the server rejecting the request for some reason. This isn't a Flurl bug. It sounds like you suspect HTTP version could have something to do with it and I do think you might be right. I haven't tried this, but in 3.x you might be able to change the HTTP version using the BeforeCall event and changing call.HttpRequestMessage.Version.
Flurl.Http" Version="3.2.4"
Dotnet Version: 7
Source and Destination api has been started using Https and can accept both http1.1 and Http 2.0.
@tmenier - I'm getting this error randomly in production, Hence I do not have a code to reproduce this error.
This error happens when one service is invoking another service it randomly fails with the below server.
"Flurl.Http.FlurlHttpException: Call failed. An error occurred while sending the request:
POST https://amy-service/api/updateorder\\n ---
\u003E System.Net.Http.HttpRequestException: An error occurred while sending the request.\n ---\u003E System.IO.IOException:
The response ended prematurely.\n at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)\n
--- End of inner exception stack trace ---\n at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)\n
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)\n
at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)\n
at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)\n
at System.Net.Http.HttpClient.\u003CSendAsync\u003Eg__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)\n
at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, CancellationToken cancellationToken, HttpCompletionOption completionOption)\n
--- End of inner exception stack trace ---\n at Flurl.Http.FlurlRequest.HandleExceptionAsync(FlurlCall call, Exception ex, CancellationToken token)\n
at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, CancellationToken cancellationToken, HttpCompletionOption completionOption)\n
at Flurl.Http.FlurlRequest.SendAsync(HttpMethod verb, HttpContent content, CancellationToken cancellationToken, HttpCompletionOption completionOption)\n
Although the destination server can accept Http/2 the protocol chosen is Http 1.1 since we don't have the latest version of Flurl in production env.
Any thoughts what could cause this issue ?
The text was updated successfully, but these errors were encountered: