@checkstack/frontend 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/package.json +1 -1
- package/src/App.tsx +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @checkstack/frontend
|
|
2
2
|
|
|
3
|
+
## 0.2.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8a87cd4: Fixed query retry behavior for 401/403 errors
|
|
8
|
+
|
|
9
|
+
API calls that return 401 (Unauthorized) or 403 (Forbidden) errors are no longer retried, as these are definitive auth responses that won't succeed on retry. This prevents unnecessary loading states and network requests.
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [8a87cd4]
|
|
12
|
+
- @checkstack/common@0.5.0
|
|
13
|
+
- @checkstack/auth-frontend@0.5.2
|
|
14
|
+
- @checkstack/catalog-frontend@0.3.6
|
|
15
|
+
- @checkstack/command-frontend@0.2.5
|
|
16
|
+
- @checkstack/frontend-api@0.3.2
|
|
17
|
+
- @checkstack/signal-common@0.1.3
|
|
18
|
+
- @checkstack/ui@0.3.1
|
|
19
|
+
- @checkstack/signal-frontend@0.0.9
|
|
20
|
+
|
|
21
|
+
## 0.2.5
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [83557c7]
|
|
26
|
+
- Updated dependencies [83557c7]
|
|
27
|
+
- Updated dependencies [d316128]
|
|
28
|
+
- Updated dependencies [6dbfab8]
|
|
29
|
+
- @checkstack/ui@0.3.0
|
|
30
|
+
- @checkstack/common@0.4.0
|
|
31
|
+
- @checkstack/auth-frontend@0.5.1
|
|
32
|
+
- @checkstack/catalog-frontend@0.3.5
|
|
33
|
+
- @checkstack/command-frontend@0.2.4
|
|
34
|
+
- @checkstack/frontend-api@0.3.1
|
|
35
|
+
- @checkstack/signal-common@0.1.2
|
|
36
|
+
- @checkstack/signal-frontend@0.0.8
|
|
37
|
+
|
|
3
38
|
## 0.2.4
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -50,6 +50,25 @@ const queryClient = new QueryClient({
|
|
|
50
50
|
gcTime: 5 * 60 * 1000,
|
|
51
51
|
// Don't refetch on window focus by default (can be overridden per query)
|
|
52
52
|
refetchOnWindowFocus: false,
|
|
53
|
+
// Custom retry logic: don't retry on 401/403 auth errors
|
|
54
|
+
// These are definitive responses that won't succeed on retry
|
|
55
|
+
retry: (failureCount, error) => {
|
|
56
|
+
// Check if it's an HTTP error with status code
|
|
57
|
+
const status = (error as { status?: number })?.status;
|
|
58
|
+
// Also check for oRPC error codes
|
|
59
|
+
const code = (error as { code?: string })?.code;
|
|
60
|
+
|
|
61
|
+
// Don't retry on authentication/authorization errors
|
|
62
|
+
if (status === 401 || status === 403) return false;
|
|
63
|
+
if (code === "UNAUTHORIZED" || code === "FORBIDDEN") return false;
|
|
64
|
+
|
|
65
|
+
// Default: retry up to 3 times for other errors
|
|
66
|
+
return failureCount < 3;
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
mutations: {
|
|
70
|
+
// Mutations should not retry by default (user can re-submit)
|
|
71
|
+
retry: false,
|
|
53
72
|
},
|
|
54
73
|
},
|
|
55
74
|
});
|