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
Modifying Kiali Client methods to use getRequestAndUnmarshalInto to avoid masking of errors returned by the server #7215
Conversation
getRequestAndUnmarshalInto to avoid masking of errors returned by the server (kiali#6777)
…ceHealth To address some tests that use these methods and require the error returned from the server to be NIL.
Some tests that use this method expect no error to be sent by the server, on non 200 status codes.
@nrfox One thing I noticed while making these changes is that there are some tests, that check for the invalid condition. These tests require that the error returned by the client method is NIL. But modifying the client method to use |
That sounds good. You could go a few different ways with that. 1. Return some kind of custom error type from |
Looks like you'll need to rebase as well to fix conflicts |
@nrfox Can you please review the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for the contribution!
Describe the change
Kiali client methods would try to unmarshall response from the server without checking the status code. This would mask the actual error sent by the server and make debugging difficult
This PR modifies Kiali Client methods to use getRequestAndUnmarshalInto to avoid masking of errors returned by the server.
Steps to test the PR
Run Integration tests for the backend. Changes in this PR are made to the methods used by these tests.
Automation testing
N/A
Issue reference
#6777