Add debug logging that logs the full ECS responses, which can be used with JSON log formatting to enable developing against the actual behavior of the ECS APIs.
Error when the ECS APIs return a non-2xx response. They are not specified to ever do so, but surely we should not be trying to deserialize response bodies to the usual JSON objects in such situations.