-
Notifications
You must be signed in to change notification settings - Fork 306
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
Print complete response body along with response code for BadResponse… #894
base: main
Are you sure you want to change the base?
Print complete response body along with response code for BadResponse… #894
Conversation
|
@jsvd please take a look and suggest whether the PR will be useful. |
It seems I am getting this error on my branch as well as on master. |
I think that this is necessary for me. I get the following message:
I was not familiar with the status code 400, and tried to debug this for a long time. Maybe it's easier for user to debug by having a more complete message. |
I found that currently (v10.5.1), we have four instance variables, Do you think that users need |
c750dab
to
eb63402
Compare
@LuckyWindsck my only worry is request body might become too big and spam log files. |
@karenzone please take a look. Let me know if you have any suggestions. |
Print complete response body along with response code for
BadResponseCodeError
.When a
BadResponseCodeError
happens, the response body tells the user more about the issue and can indicate how to fix it. For example, when a template is applied from Logstash to Elasticsearch, aBadResponseCodeError
does not explain much but the body can tell where the template has an issue.A more elaborate approach would be to print this only for a certain log level but it is not a log line. The caller is calling
message
method so there is a need of passing parameters to indicate required verbosity.Thanks for contributing to Logstash! If you haven't already signed our CLA, here's a handy link: https://www.elastic.co/contributor-agreement/