[aad] print http status response message

This commit is contained in:
Armin Novak 2023-07-28 15:56:35 +02:00 committed by akallabeth
parent cd7cb514a8
commit 03b78dd57b
2 changed files with 8 additions and 2 deletions

View File

@ -1143,8 +1143,12 @@ BOOL client_common_get_access_token(freerdp* instance, const char* request, char
if (resp_code != HTTP_STATUS_OK)
{
char buffer[64] = { 0 };
WLog_ERR(TAG, "Server unwilling to provide access token; returned status code %s",
freerdp_http_status_string_format(resp_code, buffer, sizeof(buffer)));
wLog* log = WLog_Get(TAG);
WLog_Print(log, WLOG_ERROR,
"Server unwilling to provide access token; returned status code %s",
freerdp_http_status_string_format(resp_code, buffer, sizeof(buffer)));
if (response_length > 0)
WLog_Print(log, WLOG_ERROR, "[status message] %s", response);
goto cleanup;
}

View File

@ -246,6 +246,8 @@ static BOOL aad_get_nonce(rdpAad* aad)
{
WLog_Print(aad->log, WLOG_ERROR,
"Server unwilling to provide nonce; returned status code %li", resp_code);
if (response_length > 0)
WLog_Print(aad->log, WLOG_ERROR, "[status message] %s", response);
goto fail;
}