From fc5a68d6273715f13a1257f02a63d668604d9f27 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Wed, 4 Sep 2024 18:49:09 -0400 Subject: [PATCH] fix(server): protect against responses with no status (#421) --- autoload/codeium/server.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/codeium/server.vim b/autoload/codeium/server.vim index 549da3d1..e359c58f 100644 --- a/autoload/codeium/server.vim +++ b/autoload/codeium/server.vim @@ -123,7 +123,7 @@ function! s:HandleGetStatusResponse(out, err, status) abort if a:status == 0 " Parse the JSON response let response = json_decode(join(a:out, "\n")) - let status = response.status + let status = get(response, 'status', {}) " Check if there is a message in the response and echo it if has_key(status, 'message') && !empty(status.message) echom status.message