-
Notifications
You must be signed in to change notification settings - Fork 11
indexer: fix reconnect on internal server errors #173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThe changes introduce two new JSON files for the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller as Requester
participant Indexer as runWithReconnect
participant Logger as Consola
Caller->>Indexer: Initiate operation
alt Error Occurs (ClientError/ServerError)
Indexer->>Indexer: Check error type (isServerError?)
Indexer->>Logger: Log "Internal [server/client] error: <message>"
Indexer->>Logger: Log "Reconnecting..."
Indexer->>Caller: Attempt reconnection
else No Error
Indexer->>Caller: Return successful response
end
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (4)
🧰 Additional context used🧬 Code Definitions (1)packages/indexer/src/indexer.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (5)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Earlier, we had a reconnect logic for only
ClientErrorinstance, which wouldn't work forServerError. So added a check for the same. Now indexer will reconnect on bothClientErrorandServerErrorwith statusINTERNAL.