Skip to content

Commit

Permalink
Write the failure reason during ACLK challenge / response (#8538)
Browse files Browse the repository at this point in the history
Improved the error logging in case of ACLK challenge / response failure
  • Loading branch information
stelfrag committed Mar 30, 2020
1 parent b8a4c9d commit c59ad78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aclk/agent_cloud_link.c
Expand Up @@ -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 };
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit c59ad78

Please sign in to comment.