Merge pull request #70 from dak2/fix-error-handling-when-sending-notification
Fix handling response when sending notifications in `examples/streamable_http_client.rb`
This commit is contained in:
commit
b28a477727
1 changed files with 2 additions and 3 deletions
|
|
@ -163,9 +163,8 @@ def main
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
if response[:body]["accepted"]
|
||||||
if response[:body]["result"]
|
logger.info("Notification sent successfully")
|
||||||
logger.info("Notification tool response: #{response[:body]["result"]["content"]}")
|
|
||||||
else
|
else
|
||||||
logger.error("Error: #{response[:body]["error"]}")
|
logger.error("Error: #{response[:body]["error"]}")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue