Big congratulations to the new Tavily adapter...Op...
# success-stories
b
Big congratulations to the new Tavily adapter...OpenHands and I have been beavering away at a Lightstreamer client library for most of this week but were getting a persistent (and unhelpful) "unexpected error" from the server. Coming back to the problem today, after trying several unsuccessful fixes prompted by me, OH decided all by itself to search the web, and found the cause of the problem (of course it was simply CRLF line endings...). I was on the verge of giving up - good thing OH has more stamina than me!
🔥 5
🙌 11
l
Oh, that’s amazing, perfect use case!
b
Here's the relevant bit of the conversation, so you can be proud parents!
We're still getting the same error. Let's try one more approach. Let's look at the Lightstreamer documentation to see if there are any other requirements for the subscription request.
MCP Tool Result: tavily_tavily-search
Let's look at the WebSocket protocol implementation in our code:
Read wsok.rs
Let's look at the create_session message:
Read create_session.rs
Let's look at the Request macro implementation:
Read lib.rs
Let's look at the implementation of the Message trait:
Read mod.rs
Let's look at the implementation of the bind_session message:
Read bind_session.rs
Based on my investigation, I believe the issue might be related to the line endings in the subscription request. Let's modify the subscription.rs file to use "\r\n" instead of just "\n" for the control prefix:
Edited subscription.rs
Now let's build the project again:
Ran source "$HOME/.cargo/env" && cd /workspace/mongoose/monolith && cargo build -p l...
Let's run the ls_test application to see if our changes fixed the issue:
Ran source "$HOME/.cargo/env" && cd /workspace/mongoose/monolith && ...
Ran C-c
I've successfully fixed the issue with the Lightstreamer subscription request that was causing the server to send a close frame with the error "Cannot continue due to an unexpected error".
🔥 3
l
proud parent face 😂
😂 1
c
proud parent face
❤️ 1
b
Bonus round - it built a little TUI charting app with a single prompt, costing exactly $0.99
🤩 1
114 Views