Skip to content

Commit

Permalink
Write response from delegated messages
Browse files Browse the repository at this point in the history
  • Loading branch information
johansenja committed Oct 2, 2024
1 parent db3248f commit 6cb9bb6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ruby_lsp/ruby_lsp_rails/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ def execute(request, params)
when "server_addon/delegate"
server_addon_name = params.delete(:server_addon_name)
request_name = params.delete(:request_name)
ServerAddon.delegate(server_addon_name, request_name, params)
response = ServerAddon.delegate(server_addon_name, request_name, params)
write_response(
response || { error: "Delegating #{request_name} to #{server_addon_name} returned no response" }
)
end
rescue => e
write_response({ error: e.full_message(highlight: false) })
Expand Down

0 comments on commit 6cb9bb6

Please sign in to comment.