Skip to content

Commit fc5a68d

Browse files
authored
fix(server): protect against responses with no status (#421)
1 parent 1513aef commit fc5a68d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/codeium/server.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function! s:HandleGetStatusResponse(out, err, status) abort
123123
if a:status == 0
124124
" Parse the JSON response
125125
let response = json_decode(join(a:out, "\n"))
126-
let status = response.status
126+
let status = get(response, 'status', {})
127127
" Check if there is a message in the response and echo it
128128
if has_key(status, 'message') && !empty(status.message)
129129
echom status.message

0 commit comments

Comments
 (0)