Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

Commit 78dc6d7

Browse files
committed
docs: add error handling info
1 parent 34a70f6 commit 78dc6d7

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Error Handling.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Server Conditions
2+
3+
These do not reflect anything wrong with the client-side application and they should not cause client-side error handling to begin, i.e don't trigger error boundaries.
4+
5+
## Offline
6+
7+
It reflects a global condition so instead of having an indicator for every surface, we have a global indicator and use toasts to notify changes in the status. We continue to show existing data in all surfaces and if there is no existing data for a particular data it gets a banner.
8+
9+
## Authorization expired
10+
11+
We contine to show existing data, and if in a surface there is no existing data it gets a banner. This is a global condition so it gets a global indicator but no toast. Once we enter this status we disable all queries so no data is fetched until the user logs in again. We short-circuit all queries so they don't retry 3 times.
12+
13+
## Error updating data
14+
15+
When there is an error updating data, a banner appears above where the data usually goes, and if there is existing data we still show the existing data. We retry 3 times before showing this banner.
16+
17+
# Client Errors
18+
19+
We propogate to the nearest error boundary. Error boundaries should be placed for every route. The error boundary shows a text input where users can enter what was happening when the error occurs. These errors are distinct from server errors.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export interface DataProvider {
2+
activate(): void;
3+
deactivate(): void;
4+
isActivated(): boolean;
5+
}

0 commit comments

Comments
 (0)