oraios/serena · error · SolidLSPException
Error processing request {method} with params: {params}
Error message
Error processing request {method} with params:
{params} What it means
SolidLSPException raised by send_request (src/solidlsp/ls_process.py:385) after the language server returned an error result for an LSP request, even after retrying on Content-Modified. The original LSP error is attached as `cause` (`result.error`). It means the server itself rejected or failed to process the request.
Source
Thrown at src/solidlsp/ls_process.py:385
"""
result = self._send_request_once(method, params)
if not result.is_error():
log.debug("Returning result:\n%s", result.payload)
return result.payload
if method in self._content_modified_retry_methods:
for attempt in range(2, _CONTENT_MODIFIED_MAX_ATTEMPTS + 1):
is_content_modified = isinstance(result.error, LSPError) and result.error.code == LSPErrorCodes.ContentModified
if not is_content_modified:
break
log.info("Request %s got ContentModified (-32801); retrying (%d/%d)", method, attempt, _CONTENT_MODIFIED_MAX_ATTEMPTS)
time.sleep(_CONTENT_MODIFIED_RETRY_DELAY)
result = self._send_request_once(method, params)
if not result.is_error():
log.debug("Returning result:\n%s", result.payload)
return result.payload
raise SolidLSPException(f"Error processing request {method} with params:\n{params}", cause=result.error) from result.error
@abstractmethod
def _send_payload(self, payload: StringDict) -> None:
"""
Send the given payload to the server
"""
def on_request(self, method: str, cb: Callable[[Any], Any]) -> None:
"""
Register the callback function to handle requests from the server to the client for the given method
"""
self.on_request_handlers[method] = cb
def on_notification(self, method: str, cb: Callable[[Any], None]) -> None:
"""
Register the callback function to handle notifications from the server to the client for the given method
"""
self.on_notification_handlers[method] = cbView on GitHub (pinned to 7fcbca7e62)
Solutions
- Inspect the `cause` attribute of the exception to see the actual LSP error message from the server.
- Ensure the language server is fully started/initialized before sending requests.
- Retry after a short delay if the cause is 'Content modified' (server is re-indexing).
- Verify the requested method/capability is supported by the configured language server.
Example fix
// before
result = ls.request_document_symbols(file_path)
// after
try:
result = ls.request_document_symbols(file_path)
except SolidLSPException as e:
log.warning("LSP request failed: %s", e.cause)
time.sleep(1.0)
result = ls.request_document_symbols(file_path) Defensive patterns
Strategy: try-catch
Validate before calling
assert ls.is_running(), "language server not started"
# only request capabilities the server advertises
if not ls.server_capabilities.get("documentSymbolProvider"):
raise SkipCapability("documentSymbol unsupported") Type guard
def lsp_error_has(cause: str) -> bool:
return "Content modified" in cause Try / catch
for attempt in range(3):
try:
return ls.request_document_symbols(path)
except SolidLSPException as e:
if "Content modified" in str(e.cause) and attempt < 2:
time.sleep(1.0)
continue
raise Prevention
- Wait for server initialization before issuing requests
- Rate-limit edits to give the server time to re-index
- Always inspect the `cause` attribute for the real LSP error
- Feature-check server_capabilities before requesting a method
When it happens
Trigger: Calling any request-style API (request_document_symbols, request_definition, request_hover, etc.) when the server replies with a JSON-RPC error such as 'Content modified' repeatedly, 'Server not initialized', method not supported, or an internal server error.
Common situations: Sending requests before server initialization completes; editing files faster than the server re-indexes (repeated Content-Modified); requesting capabilities the language server doesn't support; server internal crash on a malformed request.
Related errors
- Unhandled document change kind: {change}; Please report to S
- Unhandled document change format: {change}; Please report to
- Symbol '{name_path}' does not have a valid position in file
- Language server for {lang_server.language_id} returned no re
- Renaming symbol '{name_path}' to '{new_name}' resulted in no
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/728a29d3afb5b6c0.
Report an issue: GitHub.