Closed Blue0ctober closed 4 years ago
When passing bad configurations, the errors returned are not helpful. This may be due to error handling from responses coming from the api.
As an example configuring --api-pass=notthecorrectpassword will return in my use case:
--api-pass=notthecorrectpassword
Error executing sensu-aggregate-check: error executing check: invalid character 'U' looking for beginning of value
While configured with the correct password the check works correctly.
The 'U' is because it's expecting a JSON response back with the access token, but is instead getting only the text 'Unauthorized'.
We can definitely add something to at least catch that and surface it better.
When passing bad configurations, the errors returned are not helpful. This may be due to error handling from responses coming from the api.
As an example configuring
--api-pass=notthecorrectpassword
will return in my use case:While configured with the correct password the check works correctly.