Skip to content

Client terminates server process if it doesn't recognise a method #204

@alcarney

Description

@alcarney

Due to how the error handling is currently implemented, if the server sends an unexpected request method the client will immediately end the session and terminate the server process.

Apart from being an over-reaction, it can lead you spend a lot of time debugging the wrong thing!

----------------------------------------------------------- Captured log setup ------------------------------------------------------------
WARNING  pygls.protocol.json_rpc:json_rpc.py:394 Failed to handle request '930cd9bb-a46a-4737-bac0-355d749c524b', unknown method 'workspace/diagnostic/refresh'
========================================================= short test summary info =========================================================
ERROR tests/e2e/test_e2e_diagnostics.py::test_rst_document_diagnostic - RuntimeError: Server process 70277 exited with return code: -15
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================ 1 error in 1.27s =============================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpytest-lspIssues affecting the pytest-lsp package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions