diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2020-03-30 15:36:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-30 15:36:52 +0300 |
commit | c59ad7814e5fcc00d5a802a3dae5b4b9d27b7041 (patch) | |
tree | 483b1a2dfdb37fc8c762d9772cb42c7b07615229 /aclk | |
parent | b8a4c9dd25b1749124adc745dfbc2da6a679856a (diff) |
Write the failure reason during ACLK challenge / response (#8538)
Improved the error logging in case of ACLK challenge / response failure
Diffstat (limited to 'aclk')
-rw-r--r-- | aclk/agent_cloud_link.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/aclk/agent_cloud_link.c b/aclk/agent_cloud_link.c index 17af593910..f742176bdd 100644 --- a/aclk/agent_cloud_link.c +++ b/aclk/agent_cloud_link.c @@ -1213,7 +1213,7 @@ void aclk_get_challenge(char *aclk_hostname, char *aclk_port) info("Retrieving challenge from cloud: %s %s %s", aclk_hostname, aclk_port, url); if(aclk_send_https_request("GET", aclk_hostname, aclk_port, url, data_buffer, NETDATA_WEB_RESPONSE_INITIAL_SIZE, NULL)) { - error("Challenge failed"); + error("Challenge failed: %s", data_buffer); goto CLEANUP; } struct dictionary_singleton challenge = { .key = "challenge", .result = NULL }; @@ -1250,7 +1250,7 @@ void aclk_get_challenge(char *aclk_hostname, char *aclk_port) sprintf(url, "/api/v1/auth/node/%s/password", agent_id); if(aclk_send_https_request("POST", aclk_hostname, aclk_port, url, data_buffer, NETDATA_WEB_RESPONSE_INITIAL_SIZE, response_json)) { - error("Challenge-response failed"); + error("Challenge-response failed: %s", data_buffer); goto CLEANUP; } |