Fix: Registration wizard now verifies actual registration status#39
Fix: Registration wizard now verifies actual registration status#39
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
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. Comment |
Summary
This fix addresses a critical issue where the registration wizard displays "Registration successful!" without actually verifying that the user registration was persisted in the database.
Problem
The registration wizard was showing a success message based solely on the server's response to the registration request. However, as reported in issue #29, the server could return a successful response (HTTP 200 with
{"success": true}) while the actual database write failed silently. This resulted in:{"registered": false}This behavior was misleading and caused confusion for users who believed they were registered when they were not.
Solution
The fix adds a verification step after receiving a successful registration response:
After the registration endpoint returns success, the wizard now calls the status API (
/api/v1/bridge/bounty-challenge/status/{hotkey}) to verify the registration was actually persisted.A brief delay (500ms) is added before verification to allow for any async database writes to complete.
Based on the verification result:
status.registered == true: Display the success messagestatus.registered == false: Display a warning that registration may have failed, prompting the user to try againThis ensures users receive accurate feedback about their actual registration state.
Testing
cargo check --bin bountyget_statusmethod fromBountyClientRelated Issue
Fixes #29