Skip to content

Commit b28a477

Browse files
authored
Merge pull request #70 from dak2/fix-error-handling-when-sending-notification
Fix handling response when sending notifications in `examples/streamable_http_client.rb`
2 parents 0fe0289 + 7a5bd7c commit b28a477

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/streamable_http_client.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,8 @@ def main
163163
},
164164
},
165165
)
166-
167-
if response[:body]["result"]
168-
logger.info("Notification tool response: #{response[:body]["result"]["content"]}")
166+
if response[:body]["accepted"]
167+
logger.info("Notification sent successfully")
169168
else
170169
logger.error("Error: #{response[:body]["error"]}")
171170
end

0 commit comments

Comments
 (0)