You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consul agent returns errors in plain text. Yet when this happens the api client still tries to decode them in JSON, failing, and hiding the real error message.
It seems like some methods in the api client library do properly check the error code with requireOk, where as others do not. The methods that do not properly check the error code will error with JSON decode errors when the HTTP response was not 200. This error masks the real underlying problem, making the api client library difficult to use.
The text was updated successfully, but these errors were encountered:
We merged #11054 to allow the error status code to be queried programmatically.
Keeping this issue open until I take a pass over all doRequest() func calls and make sure they're wrapped in requireHttpCodes() or return a StatusError type
See #8816
Overview of the Issue
Copied from #8816
It seems like some methods in the
api
client library do properly check the error code withrequireOk
, where as others do not. The methods that do not properly check the error code will error with JSON decode errors when the HTTP response was not 200. This error masks the real underlying problem, making the api client library difficult to use.The text was updated successfully, but these errors were encountered: