haskell / lsp

Haskell library for the Microsoft Language Server Protocol
360 stars 89 forks source link

Handle custom error codes in ResponseError + support spec 3.17 #455

Closed thomasjm closed 1 year ago

thomasjm commented 1 year ago

At present the ErrorCode type only handles the reserved codes defined in the spec, but the server is free to use its own codes. So I extended it with a constructor ErrorCodeCustom Int. Without this change, parsing error messages with non-reserved codes fails.

Also, I added ServerCancelled and RequestFailed, which were added in spec version 3.17.