Add console error
This commit is contained in:
parent
d237df6389
commit
ded02d112c
|
@ -16,6 +16,7 @@ export const showSettingsFailure = createAction('SETTINGS_FAILURE_SHOW');
|
||||||
export const toggleSetting = (settingKey, status) => async (dispatch) => {
|
export const toggleSetting = (settingKey, status) => async (dispatch) => {
|
||||||
let successMessage = '';
|
let successMessage = '';
|
||||||
try {
|
try {
|
||||||
|
// TODO move setting keys to constants
|
||||||
switch (settingKey) {
|
switch (settingKey) {
|
||||||
case 'filtering':
|
case 'filtering':
|
||||||
if (status) {
|
if (status) {
|
||||||
|
|
|
@ -14,6 +14,7 @@ export default class Api {
|
||||||
});
|
});
|
||||||
return response.data;
|
return response.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
throw new Error(`${this.baseUrl}/${path} | ${error.response.data} | ${error.response.status}`);
|
throw new Error(`${this.baseUrl}/${path} | ${error.response.data} | ${error.response.status}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue