summaryrefslogtreecommitdiff
path: root/lsp-parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'lsp-parse.c')
-rw-r--r--lsp-parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lsp-parse.c b/lsp-parse.c
index f720d12..a816ec9 100644
--- a/lsp-parse.c
+++ b/lsp-parse.c
@@ -694,6 +694,7 @@ static void process_message(LSP *lsp, JSON *json) {
}
}
+ double error_code = json_force_number(json_get(json, "error.code"));
JSONValue error = json_get(json, "error.message");
JSONValue result = json_get(json, "result");
if (result.type != JSON_UNDEFINED || error.type == JSON_STRING) {
@@ -708,7 +709,7 @@ static void process_message(LSP *lsp, JSON *json) {
response.error = json_string_get_alloc(json, error.val.string);
}
- if (response.error) {
+ if (response.error && error_code != LSP_ERROR_REQUEST_CANCELLED) {
add_to_messages = true;
} else switch (response_to.type) {
case LSP_REQUEST_COMPLETION: