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:
Koichi ITO 2025-06-21 20:19:35 +09:00 • committed by GitHub
commit b28a477727
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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