lsp: Do not set error/result fields if they're missing. (#10610)

We were previously not conforming to LSP spec, as we were setting
**both** result field and error field on response fields, which could
confuse servers. Excerpt from the spec:
> * The result of a request. This member is REQUIRED on success.
> * This member MUST NOT exist if there was an error invoking the
method.

Fixes #10595

Release Notes:

- N/A
e34c443331Piotr Osiewicz committed on 4/16/2024, 12:27:12 PM· committed by GitHubparent2630230
1 file changedLine totals unavailable