ryukzak / nitta

BSD 3-Clause "New" or "Revised" License
21 stars 6 forks source link

Error handling for server calls #34

Open ryukzak opened 3 years ago

ryukzak commented 3 years ago

Right now, usually, in case of a network error, we use console.log() or (which is better) alert(). We need to fix this:

How to reproduce:

An error message should be helpful. For example, we can include expecting server port.

iburakov commented 3 years ago

RequestResult utility component (components/utils/RequestResult) can be used to conveniently

  1. display spinner when loading
  2. display error message with refresh button (default) or customized content on error
  3. render result on success

See usage for examples.