JSON body fix in examples/http_server.rb
This commit is contained in:
parent
91af9ad19a
commit
2942d456cc
1 changed files with 1 additions and 1 deletions
|
|
@ -125,7 +125,7 @@ app = proc do |env|
|
||||||
|
|
||||||
# Log the MCP response details
|
# Log the MCP response details
|
||||||
_, _, body = response
|
_, _, body = response
|
||||||
if body.is_a?(Array) && !body.empty?
|
if body.is_a?(Array) && !body.empty? && body.first
|
||||||
begin
|
begin
|
||||||
parsed_response = JSON.parse(body.first)
|
parsed_response = JSON.parse(body.first)
|
||||||
if parsed_response["error"]
|
if parsed_response["error"]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue