Skip to content

Commit 29a9e3d

Browse files
fix: log errors
1 parent b5eeee2 commit 29a9e3d

File tree

1 file changed

+7
-1
lines changed
  • src/store/reducers/settings

1 file changed

+7
-1
lines changed

src/store/reducers/settings/api.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export const settingsApi = api.injectEndpoints({
4343

4444
return {data};
4545
} catch (error) {
46+
console.error('Cannot get setting:', error);
4647
return {error};
4748
}
4849
},
@@ -94,7 +95,10 @@ export const settingsApi = api.injectEndpoints({
9495
setSettingValueToLS(name, data.value);
9596
}
9697
}
97-
} catch {}
98+
} catch {
99+
// In case of an error there is no value to sync
100+
// LS or default value was loaded to store
101+
}
98102
},
99103
}),
100104
setSingleSetting: builder.mutation({
@@ -120,6 +124,7 @@ export const settingsApi = api.injectEndpoints({
120124

121125
return {data};
122126
} catch (error) {
127+
console.error('Cannot update setting:', error);
123128
return {error};
124129
}
125130
},
@@ -206,6 +211,7 @@ export const settingsApi = api.injectEndpoints({
206211

207212
return {data};
208213
} catch (error) {
214+
console.error('Cannot get settings:', error);
209215
return {error};
210216
}
211217
},

0 commit comments

Comments
 (0)