Fix sei-apis rpc error handling - #654
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughA new regular expression was introduced in the internal logic of the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant RpcSource
Caller->>RpcSource: getSuggestedBlockIntervalFromExn(error)
alt Matches blockpiRangeRegExp
RpcSource-->>Caller: Return parsed interval
else Matches maxAllowedBlocksRegExp
RpcSource-->>Caller: Return max allowed blocks interval
else Matches baseRangeRegExp
RpcSource-->>Caller: Return 2000
else Matches blastPaidRegExp
RpcSource-->>Caller: Return parsed interval
else
RpcSource-->>Caller: Return None
end
Estimated code review effort2 (~12 minutes) Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
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:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
| switch maxAllowedBlocksRegExp->Js.Re.exec_(message) { | ||
| | Some(execResult) => extractBlockRange(execResult) | ||
| | None => | ||
| switch blastPaidRegExp->Js.Re.exec_(message) { | ||
| | Some(execResult) => extractBlockRange(execResult) | ||
| switch baseRangeRegExp->Js.Re.exec_(message) { | ||
| | Some(_) => Some(2000) |
There was a problem hiding this comment.
It used to catch the base case before with 2000 range hardcoded.
Summary by CodeRabbit
Bug Fixes
Tests