MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / handleRequestFailed

Method handleRequestFailed

LLMClientInterface.cpp:82–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void LLMClientInterface::handleRequestFailed(const QString &requestId, const QString &error)
83{
84 auto it = m_activeRequests.find(requestId);
85 if (it == m_activeRequests.end())
86 return;
87
88 const RequestContext &ctx = it.value();
89
90 LOG_MESSAGE(QString("Request %1 failed: %2").arg(requestId, error));
91
92 // Send LSP error response to client
93 QJsonObject response;
94 response["jsonrpc"] = "2.0";
95 response[LanguageServerProtocol::idKey] = ctx.originalRequest["id"];
96
97 QJsonObject errorObject;
98 errorObject["code"] = -32603; // Internal error code
99 errorObject["message"] = error;
100 response["error"] = errorObject;
101
102 emit messageReceived(LanguageServerProtocol::JsonRpcMessage(response));
103
104 m_activeRequests.erase(it);
105 m_performanceLogger.endTimeMeasurement(requestId);
106}
107
108void LLMClientInterface::sendData(const QByteArray &data)
109{

Callers

nothing calls this directly

Calls 2

valueMethod · 0.80
endTimeMeasurementMethod · 0.80

Tested by

no test coverage detected