Closed pauldelucia closed 2 days ago
[!IMPORTANT]
Review skipped
Auto reviews are disabled on base/target branches other than the default branch.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository. To trigger a single review, invoke the@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
The changes in this pull request enhance error handling in the query_dpns_contested_resources
and query_dpns_vote_contenders
methods by introducing a retry mechanism for transient errors. A maximum of three retries is allowed for specific error messages, improving robustness during resource fetching. Additionally, the display_message
method in the UI is modified to filter out certain error messages to streamline user notifications. The overall control flow remains similar, but these adjustments increase the resilience and clarity of error handling across the application.
File Path | Change Summary |
---|---|
src/backend_task/contested_names/query_dpns_contested_resources.rs |
Introduced a retry mechanism for fetching contested resources with a maximum of 3 retries for specific transient errors. Standardized error logging. Updated handling of start_at_value . |
src/backend_task/contested_names/query_dpns_vote_contenders.rs |
Added a retry mechanism for fetching vote contenders, allowing up to 3 retries for specific errors. Restructured control flow with a loop for attempts. Method signature updated. |
src/ui/dpns_contested_names_screen.rs |
Modified display_message to prevent displaying certain error messages, specifically those containing "try another server." Logic updated without changing method signature. |
query_dpns_vote_contenders
method, which is similar to the retry logic added in the query_dpns_contested_resources
method of the main PR.DPNSContestedNamesScreen
to handle different subscreens, which may relate to the overall error handling and resource querying logic in the main PR's context of contested resources.add_dpns_subscreen_chooser_panel
function in this PR enhance the interaction with the application context, which is relevant to the changes made in the main PR regarding error handling and resource fetching.🐰 In the meadow, where bunnies play,
A retry mechanism brightens the day.
With each little hop, we fetch with cheer,
Filtering messages, we hold dear.
So let’s dance and twirl, with joy we’ll sing,
For error handling's a wonderful thing! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Retry querying contested resources and contenders up to 3 times when error message contains "try another server" or "contract not found when querying from value with contract info".
Now, all contested names and contenders are fetched by just clicking "refresh" once, and there are no error messages at the top.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation