dotnet / dotnet/yarp

Request timeouts reported as ForwarderError.RequestCanceled instead of RequestTimedOut

Open
#2,662 3 comments 0 reactions 0 assignees View on GitHub
Type: Bug
Dominant language
C#
Stars
9.6k
Forks
933
Avg merge
12d 18h
Merged PRs (30d)
2

Description

> Hello,
>
> Confirming the same behavior on the 2.2.0 release, but let me add more details.
> But when the request timed out, it returned a 400 instead of a 504.
>
> Trying to configure timeouts with [`ForwarderRequestConfig.ActivityTimeout`](https://microsoft.github.io/reverse-proxy/articles/http-client-config.html#httprequest) on a cluster and [`Timeout/TimeoutPolicy`](https://microsoft.github.io/reverse-proxy/articles/timeouts.html#configuration) on a route, but results are different: the first configuration returns `504 Gateway Timeout`, second - `400 Bad Request`. Shouldn't the results be the same?
>
> @MihaZupan, created a [repository](https://github.com/alekseikhripunov/yarp-timeouts-playground), please have a look.
> Are you able to create a minimal runnable repro for the issue?

_Originally posted by @alekseikhripunov in [#2581](https://github.com/microsoft/reverse-proxy/issues/2581#issuecomment-2488670059)_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.