@cryptotaxi247 / netdata-1 / commits / c59ad7814

Write the failure reason during ACLK challenge / response (#8538)

Improved the error logging in case of ACLK challenge / response failure

Stelios Fragkakis committed Mar 30, 2020 at 15:36 UTC c59ad7814e5fcc00d5a802a3dae5b4b9d27b7041
1 file changed +2 -2
aclk/agent_cloud_link.c
+2 -2
@@ -1213,7 +1213,7 @@ void aclk_get_challenge(char *aclk_hostname, char *aclk_port)
1213 info("Retrieving challenge from cloud: %s %s %s", aclk_hostname, aclk_port, url);
1214 if(aclk_send_https_request("GET", aclk_hostname, aclk_port, url, data_buffer, NETDATA_WEB_RESPONSE_INITIAL_SIZE, NULL))
1215 {
1216 - error("Challenge failed");
1216 + error("Challenge failed: %s", data_buffer);
1217 goto CLEANUP;
1218 }
1219 struct dictionary_singleton challenge = { .key = "challenge", .result = NULL };
@@ -1250,7 +1250,7 @@ void aclk_get_challenge(char *aclk_hostname, char *aclk_port)
1250 sprintf(url, "/api/v1/auth/node/%s/password", agent_id);
1251 if(aclk_send_https_request("POST", aclk_hostname, aclk_port, url, data_buffer, NETDATA_WEB_RESPONSE_INITIAL_SIZE, response_json))
1252 {
1253 - error("Challenge-response failed");
1253 + error("Challenge-response failed: %s", data_buffer);
1254 goto CLEANUP;
1255 }
1256