-
Notifications
You must be signed in to change notification settings - Fork 46
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
fix(web): error-handling-in-submit-evidence-modal #1724
Conversation
WalkthroughThe changes in the Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
🪧 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 (
|
✅ Deploy Preview for kleros-v2-neo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kleros-v2-testnet-devtools ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kleros-v2-testnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Code Climate has analyzed commit 61c5ed7 and detected 0 issues on this pull request. View more on Code Climate. |
|
✅ Deploy Preview for kleros-v2-university ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- web/src/pages/Cases/CaseDetails/Evidence/SubmitEvidenceModal.tsx (1 hunks)
🧰 Additional context used
📓 Learnings (1)
web/src/pages/Cases/CaseDetails/Evidence/SubmitEvidenceModal.tsx (2)
Learnt from: Harman-singh-waraich PR: kleros/kleros-v2#1687 File: web/src/pages/Cases/CaseDetails/Evidence/SubmitEvidenceModal.tsx:67-84 Timestamp: 2024-09-12T14:45:48.019Z Learning: In the `submitEvidence` function of the SubmitEvidenceModal component, the try-catch block is specifically designed to handle errors from the `constructEvidence` function, which may throw an Error if file upload fails. This ensures that the file is successfully uploaded before proceeding with evidence submission and transaction signing.
Learnt from: Harman-singh-waraich PR: kleros/kleros-v2#1687 File: web/src/pages/Cases/CaseDetails/Evidence/SubmitEvidenceModal.tsx:67-84 Timestamp: 2024-10-08T16:23:56.291Z Learning: In the `submitEvidence` function of the SubmitEvidenceModal component, the try-catch block is specifically designed to handle errors from the `constructEvidence` function, which may throw an Error if file upload fails. This ensures that the file is successfully uploaded before proceeding with evidence submission and transaction signing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
closes #1718
PR-Codex overview
This PR improves error handling in the
submitEvidence
function within theSubmitEvidenceModal.tsx
file by providing more informative feedback when an error occurs during evidence submission.Detailed summary
catch
block to accept anerror
parameter.toast.error
message to notify users of the failure to submit evidence.console.error
.Summary by CodeRabbit
New Features
Bug Fixes