Skip to content

Commit e40f3bb

Browse files
committed
Remove rescue for JSON.parse
1 parent 93679ba commit e40f3bb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/ruby_lsp/ruby_lsp_rails/runner_client.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,7 @@ def read_response
6262
headers = @stdout.gets("\r\n\r\n")
6363
raw_response = @stdout.read(T.must(headers)[/Content-Length: (\d+)/i, 1].to_i)
6464

65-
response = begin
66-
JSON.parse(T.must(raw_response), symbolize_names: true)
67-
rescue JSON::ParserError => e
68-
{ error: e.message }
69-
end
65+
response = JSON.parse(T.must(raw_response), symbolize_names: true)
7066

7167
if response[:error]
7268
warn("Ruby LSP Rails error: " + response[:error])

0 commit comments

Comments
 (0)