The best way to handle errors is to try to prevent them. Ask target users to test your application as you’re designing it and adjust the workflow to help users avoid encountering errors. Any work that you do while you’re designing your application can save users from being frustrated or annoyed when they use your application. For example,
Carefully consider whether you need to inform users of an error. If you do need to inform users of an error, expose the error in as moderate a way as possible.
| Type | Examples | Action |
|---|---|---|
| Inline Always consider using this type of notification first.
|
|
Attach the notification to the affected item. You can add a subtle side to side animation to emphasize the location of the error. This approach allows users to continue without being blocked by an error. |
| Toast If an inline notification isn’t possible, consider a toast.
|
|
Display a toast on the screen. Once users start to interact with the screen, the toast should disappear after 3 seconds. This approach allows users to continue without being blocked by an error. |
| Dialog Use when users must be informed explicitly of an error.
|
Restarting an application |
Display an inquiry dialog which requires users to take action before being able to continue. This approach makes sure that users are aware of the error. |
Best practices