Fix RPC error results

This commit is contained in:
badaix 2025-01-15 22:41:46 +01:00
parent 9e6009cad0
commit ea07cb715d
3 changed files with 48 additions and 28 deletions

View file

@ -157,7 +157,8 @@ void Server::processRequest(const jsonrpcpp::request_ptr& request, AuthInfo& aut
else
{
LOG(ERROR, LOG_TAG) << "Method not found: " << request->method() << "\n";
throw jsonrpcpp::MethodNotFoundException(request->id());
auto response = std::make_shared<jsonrpcpp::MethodNotFoundException>(request->id());
on_response(std::move(response), nullptr);
}
}