-
Notifications
You must be signed in to change notification settings - Fork 852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ProxyResponse is null in AddResponseTransform #2562
Comments
You can access the error via |
Thanks @MihaZupan , I'll try that. I think it's worth mentioning in the docs of |
I tried it and now I see (in another endpoint BTW) the following information:
Does it give you any hint about the root cause? To me it still doesn't mean anything useful... |
reverse-proxy/src/ReverseProxy/Forwarder/ForwarderError.cs Lines 26 to 29 in b1a1d8b
Updating the docs on ProxyResponse to hint at using |
Thanks! |
Describe the bug
I'm not 100% sure it's a bug, but either it is, or something is unclear to me.
Occasionally* I'm seeing that
ResponseTransformContext.ProxyResponse
isnull
inside a delegate I pass toTransformBuilderContext.AddResponseTransform
, and I don't understand how that's possible. I see that the summary ofResponseTransformContext.ProxyResponse
says it "can be null if the destination did not respond", but I see from the logs of the proxied service that it did send a response (with Status code 401- Unauthorized, though I'm not sure it's related). Even if for some reason that response message was lost, then I would expect to have a way to get the error of the root cause (e.g. timeout, DNS issue, network disconnected, etc.). but I don't find any property that return that information. Note that I don't think that the problem is timeout because from the logs I see that I got the callback immediately after the proxied service responded.*I saw it only twice out of 632 responses from the same endpoint (over a week period), and out of 9635 responses from all (3) endpoints. All of the responses from that endpoint return status 401. In most cases
ResponseTransformContext.ProxyResponse
is notnull
, but in those two cases out of 632 it is.To Reproduce
I cannot reproduce it deterministically (and the chances to hit are very low as I mentioned above), but I can outline the structure of my code in regard to YARP. (It may be possible to reproduce it deterministically using load testing, but I don't have the time and resources for it now)
Further technical details
The text was updated successfully, but these errors were encountered: