adminforth 2.67.0 → 2.67.1

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.
@@ -29,6 +29,9 @@ export async function getList(resource: AdminForthResourceFrontend, isPageLoaded
29
29
  },
30
30
  abortSignal: abortController.signal
31
31
  });
32
+ if (abortController.signal.aborted) {
33
+ return;
34
+ }
32
35
  if (data.error) {
33
36
  showErrorTost(data.error);
34
37
  rows = [];
@@ -149,6 +149,10 @@ export async function callApi({path, method, body, headers, silentError = false,
149
149
  }
150
150
  return await r.json();
151
151
  } catch(e) {
152
+ if (e instanceof DOMException && e.name === 'AbortError') {
153
+ return null;
154
+ }
155
+
152
156
  // if it is internal error, say to user
153
157
  if (e instanceof TypeError && e.message === 'Failed to fetch') {
154
158
  // this is a network error
@@ -158,7 +162,7 @@ export async function callApi({path, method, body, headers, silentError = false,
158
162
  return null;
159
163
  }
160
164
 
161
- if (!silentError && !(e instanceof DOMException && e.name === 'AbortError')) {
165
+ if (!silentError) {
162
166
  adminforth.alert({variant:'danger', message: t('Something went wrong, please try again later'),})
163
167
  }
164
168
  console.error(`error in callApi ${path}`, e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.67.0",
3
+ "version": "2.67.1",
4
4
  "description": "OpenSource Agent-Native forth-generation admin panel",
5
5
  "keywords": [
6
6
  "adminforth",