Skip to content

Required message field is missing from error response ContentModified #879

Description

@kdarkhan

I am using lua-language-server using nvim-lsp client.

When I try to jump to definition inside a file which has not completed loading, sometimes I get ContentModified error response.
https://github.com/sumneko/lua-language-server/blob/9744eb716f3b521f14331d4769925380c3dc3d84/script/proto/define.lua#L186

The response object has code but no message field.
Example here

{
  "code": -32801
}

That is causing the error in telescope-lsp handler which I am fixing in nvim-telescope/telescope.nvim#1630

I checked Language Server Protocol specification and it seems message field is required and cannot be omitted.
Link here

If I understand it correctly then lua-language-server should be returning an error response which always contains message field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions