Merge pull request #5804 from Icinga/fix/update-repository-message-error

Silence UpdateRepository message errors
This commit is contained in:
Michael Friedrich 2017-11-28 11:27:12 +01:00 committed by GitHub
commit 8e65aa0677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -208,11 +208,12 @@ void JsonRpcConnection::MessageHandler(const String& jsonString)
try {
ApiFunction::Ptr afunc = ApiFunction::GetByName(method);
if (!afunc)
Log(LogWarning, "JsonRpcConnection")
if (!afunc) {
Log(LogNotice, "JsonRpcConnection")
<< "Call to non-existent function '" << method << "' from endpoint '" << m_Identity << "'.";
else
} else {
resultMessage->Set("result", afunc->Invoke(origin, message->Get("params")));
}
} catch (const std::exception& ex) {
/* TODO: Add a user readable error message for the remote caller */
String diagInfo = DiagnosticInformation(ex);