Skip to content
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

Error Handling in app #55

Open
oslfmt opened this issue Aug 4, 2022 · 2 comments
Open

Error Handling in app #55

oslfmt opened this issue Aug 4, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@oslfmt
Copy link
Contributor

oslfmt commented Aug 4, 2022

Error handling is practically non-existent right now. We'll need someone to devise an error checking plan and then test for errors and then solve them aka "bug hunting". See #54 for more details.

@oslfmt oslfmt added the bug Something isn't working label Aug 5, 2022
@oslfmt
Copy link
Contributor Author

oslfmt commented Aug 5, 2022

Here's a list of issues we need to address. These are all errors, but not criticial. They won't crash the app. The big picture is:

  • all solidity (EthersAPI.js) functions need error handling, returning the solidity contract, network, or whatever error to where it can be properly handled
  • same for web3storage functions

More specifically:

  • nonmember voting -- check if user has NFT, if so either display a msg that they can't vote or disable the buttons altogether
  • don't allow duplicate voting --> once vote() has been called, we should move the proposal to the "my votes" section. Or for now we can just disable the voting button afterwards. Easiest is to display an error saying "you've already voted"
  • make delegate button more informative --> once successful, relay this information to the user
  • submitting a proposal
    • propagate any solidity errors to the frontend, displaying them in the UI to the user
    • if any IPFS errors, similarly propagate and handle

The simplest strategy for now is put error handling in all the api functions. Then do a simple UI alert to the user about the error and type, along with a suggestion. This can be a simple alert() function call.

In the future, we can take preventative measures with the UI to prevent the errors from even occurring in the first place, such as removing vote buttons, hiding things if no NFT, etc.

@oslfmt
Copy link
Contributor Author

oslfmt commented Aug 6, 2022

Another bug: setting metamask provider in app. If there is no metamask installed, app will never load and will just display a blank page. This is a critical bug.

Will address along with the metamask connect refactoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant