-
Notifications
You must be signed in to change notification settings - Fork 1.2k
No ResponseBodyInBytes or StatusCode when 401 #1928
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
Comments
After a while, found out that the response that was returned by the connection (and that has the ResponseBodyInBytes and the 401 HttpStatusCode) is kept inside the OriginalException. |
Which version of NEST is this? |
2.0.5 |
This is closely related to: #1901 and we have several tests that validate ResponseInBytes get set, but you still need to enable DirectStreaming. The statuscode should always be set though. What are your connection settings and how do you instantiate the client? When you do var response = client.Call(); Does client.Call() return or do you get an |
Ahh these tests only tests the ElasticsearchClientExeption (whether thrown or set on the response depending on throwing behaviour set on ConnectionSettings) Caught the behaviour in a test will send a PR shortly, thanks for reporting @TioLuiso 👍 |
…h-response fix #1928 bad auth response misses status code
We have a Nginx that we use for authentication purposes. When it returns a 401, ElasticClient returns us a response with no status code and no ResponseBodyInBytes.
DebugInformation has the following
The text was updated successfully, but these errors were encountered: