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

Commit a51087c

Browse files
#89 - Log error only if not a cancelled request
1 parent 83ce14d commit a51087c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

client/src/lib/groups.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ export async function getGroups(apiClient, handle, cancelToken) {
1818
cancelToken,
1919
});
2020
} catch (error) {
21-
console.log(error);
2221
if (Axios.isCancel(error)) {
2322
return undefined;
2423
}
24+
console.log(error);
2525
// TODO - handle error
2626
return { myGroups, otherGroups };
2727
}
@@ -43,10 +43,10 @@ export async function getGroups(apiClient, handle, cancelToken) {
4343
{ cancelToken }
4444
);
4545
} catch (error) {
46-
console.log(error);
4746
if (Axios.isCancel(error)) {
4847
return undefined;
4948
}
49+
console.log(error);
5050
// TODO - handle error
5151
return { myGroups, otherGroups };
5252
}
@@ -70,10 +70,10 @@ export async function getGroups(apiClient, handle, cancelToken) {
7070
{ cancelToken }
7171
);
7272
} catch (error) {
73-
console.log(error);
7473
if (Axios.isCancel(error)) {
7574
return undefined;
7675
}
76+
console.log(error);
7777
// TODO - handle error
7878
return { myGroups, otherGroups };
7979
}
@@ -104,10 +104,10 @@ export async function getGroups(apiClient, handle, cancelToken) {
104104
{ cancelToken }
105105
);
106106
} catch (error) {
107-
console.log(error);
108107
if (Axios.isCancel(error)) {
109108
return undefined;
110109
}
110+
console.log(error);
111111
// TODO - handle error
112112
return { myGroups, otherGroups };
113113
}
@@ -127,10 +127,10 @@ export async function getGroups(apiClient, handle, cancelToken) {
127127
{ cancelToken }
128128
);
129129
} catch (error) {
130-
console.log(error);
131130
if (Axios.isCancel(error)) {
132131
return undefined;
133132
}
133+
console.log(error);
134134
// TODO - handle error
135135
return { myGroups, otherGroups };
136136
}

0 commit comments

Comments
 (0)