Skip to content

fix(#3123): fix blank screen on unhandled wallet error#3613

Merged
MSzalowski merged 1 commit into
developfrom
fix/3123-blank-screen-on-vote-submission-due-to-unhandled-blockfrost-api-limit-error
May 14, 2025
Merged

fix(#3123): fix blank screen on unhandled wallet error#3613
MSzalowski merged 1 commit into
developfrom
fix/3123-blank-screen-on-vote-submission-due-to-unhandled-blockfrost-api-limit-error

Conversation

@MSzalowski
Copy link
Copy Markdown
Contributor

List of changes

  • fix blank screen on unhandled wallet error

Checklist

  • related issue
  • My changes generate no new warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the changelog
  • I have added tests that prove my fix is effective or that my feature works

@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks succeeded

2 similar comments
@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks succeeded

@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks succeeded

}}
>
{state?.message}{" "}
{typeof state?.message === "string" && state?.message}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally there was a space after the message, do we want to keep it?

@MSzalowski MSzalowski force-pushed the fix/3123-blank-screen-on-vote-submission-due-to-unhandled-blockfrost-api-limit-error branch from 60f5c5a to 23da493 Compare May 14, 2025 07:15
@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks succeeded

2 similar comments
@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks succeeded

@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks succeeded

const errorMessage =
error && typeof error === "object" && "info" in error
? error.info
: JSON.stringify(error, Object.getOwnPropertyNames(error));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[context]
Some of the wallets' errors contain info key, but the javascript's errors (throw new Error("Whoops!")) contain a message key.
We could support both, but as for that the safest option is just to make sure that we return a string. Possibly after further requests we will consider how exactly to handle it, because maybe there is some other type of error that we have not defined

Copy link
Copy Markdown
Contributor

@Ciabas Ciabas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! 👍
The only puzzling thing is the removal of space, but I leave that to your judgement.

@MSzalowski MSzalowski merged commit ab3d897 into develop May 14, 2025
8 checks passed
@MSzalowski MSzalowski deleted the fix/3123-blank-screen-on-vote-submission-due-to-unhandled-blockfrost-api-limit-error branch May 14, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Blank Screen on Vote Submission Due to Unhandled Blockfrost API Limit Error

2 participants