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

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/e34c443331e6498dce80a6ec2d60ade1985e7b62)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: e34c443331e6498dce80a6ec2d60ade1985e7b62

Requested commit: e34c443331e6498dce80a6ec2d60ade1985e7b62

Commit: e34c443331e6498dce80a6ec2d60ade1985e7b62

Tree: 245d939e54c7b343d3d37f0a3dec70395c18c80b

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
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
```

## Parents

- [263023021d80f6caa08c23ea25dea4615cdb5594](https://git.cafe/gitcafe/zed/commit/263023021d80f6caa08c23ea25dea4615cdb5594?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/e34c443331e6498dce80a6ec2d60ade1985e7b62?format=markdown)
