UI: Log YouTube API HTTP request errors
This commit is contained in:
parent
cb51c974f4
commit
eb62162d50
@ -84,8 +84,13 @@ bool YoutubeApiWrappers::TryInsertCommand(const char *url,
|
|||||||
if (error_code)
|
if (error_code)
|
||||||
*error_code = httpStatusCode;
|
*error_code = httpStatusCode;
|
||||||
|
|
||||||
if (!success || output.empty())
|
if (!success || output.empty()) {
|
||||||
|
if (!error.empty())
|
||||||
|
blog(LOG_WARNING, "YouTube API request failed: %s",
|
||||||
|
error.c_str());
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
json_out = Json::parse(output, error);
|
json_out = Json::parse(output, error);
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
blog(LOG_DEBUG, "YouTube API command answer: %s",
|
blog(LOG_DEBUG, "YouTube API command answer: %s",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user