Errors and fallbacks
Keep usable functionality available during connection, permission, lifecycle, or service failures, and provide clear, recoverable states.
Handle each type of failure#
| Situations encountered | What the application should do | Further confirmation |
|---|---|---|
| Device disconnected or message timed out | Disables the device-dependent operation and shows whether the current result has been confirmed. | Ask for connections and business status before deciding whether to try again. |
| Permission denied or capability missing | Describe the functions affected and retain a path that does not depend on that capability. | Check declarations, authorization, Host / Bridge support, and call state. |
| Suspension, exit, or runtime recreation | End old requests and release resources no longer in use. | Reinitialize or query state on recovery; do not reuse old sessions. |
| Service failed or content empty | Provides clear empty status, timeout and cancellation operations. | Query long-running server tasks by task ID to avoid duplicate submissions. |