added a check for the presence of the “services” field in the response body of the getServicesList() function

This commit is contained in:
vladimir.kuznetsov 2024-11-25 14:57:03 +07:00
parent e4e433bff8
commit 793abd61ea
4 changed files with 12 additions and 3 deletions

View file

@ -377,6 +377,13 @@ ErrorCode ApiController::getServicesList(QByteArray &responseBody)
auto errorCode = checkErrors(sslErrors, reply);
reply->deleteLater();
if (errorCode == ErrorCode::NoError) {
if (!responseBody.contains("services")) {
return ErrorCode::ApiServicesMissingError;
}
}
return errorCode;
}