Skip to content

Remove LSP specific error codes #68

@Seelengrab

Description

@Seelengrab

JSONRPC.jl/src/core.jl

Lines 18 to 30 in 5adc04b

elseif ex.code == -32099
"serverErrorStart"
elseif ex.code == -32000
"serverErrorEnd"
elseif ex.code == -32002
"ServerNotInitialized"
elseif ex.code == -32001
"UnknownErrorCode"
elseif ex.code == -32800
"RequestCancelled"
elseif ex.code == -32801
"ContentModified"
else

These are not listed in the JSON-RPC specification under section 5.1, so should probably be removed, as they are in the application defined section and may be different for other servers/clients.

A potential fix would be to have a wrapper error in LanguageServer.jl for the (then missing) custom printing, which would be thrown in places where JSON-RPC errors can occur by catching & rethrowing with the wrapper type. If that is acceptable, I can try to make PRs here and at LanguageServer.jl to implement this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions