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]["result"]
|
||||
logger.info("Notification tool response: #{response[:body]["result"]["content"]}")
|
||||
if response[:body]["accepted"]
|
||||
logger.info("Notification sent successfully")
|
||||
else
|
||||
logger.error("Error: #{response[:body]["error"]}")
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue