babylonchain / simple-staking

Simple staking application
Other
4 stars 13 forks source link

Graceful error handling #35

Closed gbarkhatov closed 4 months ago

gbarkhatov commented 4 months ago

The application should gracefully handle errors in each of the components. In case something is wrong, we can show an error placeholder

jrwbabylonlab commented 4 months ago

@gbarkhatov Could we have a sample example on what the end result would be?

gbarkhatov commented 4 months ago

@jrwbabylonchain @jeremy-babylonchain I haven't made any examples yet because I'm focused on another part of the app. The main idea of this ticket is if:

  1. Data is not coming from the API
  2. Data is wrong - x.y.z access where x does not have either y or z All of the above should not blow the application and UI. Show either loading indicators or placeholders
gbarkhatov commented 4 months ago

Additionally we should:

  1. Show popups/alerts with the success (warnings?) scenarios: https://daisyui.com/components/alert/ (staking success)
  2. Show modals in case of errors: https://i.imgur.com/hxtU1qH.png (staking error)
  3. Validate the form fields nicely in the UI (can be extracted to a separate issue)
gbarkhatov commented 4 months ago

Closed in #86