Explore: Fix displaying rich history saving error message (#39766)

* Explore: Fix displaying rich history saving error message

* Keep generic error message

* remove testing snippet
This commit is contained in:
Piotr Jamróz 2021-09-30 09:22:57 +02:00 committed by GitHub
parent c2754eb9cc
commit f8ebcaa0d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@ export function addToRichHistory(
store.setObject(RICH_HISTORY_KEY, updatedHistory);
return updatedHistory;
} catch (error) {
dispatch(notifyApp(createErrorNotification(error)));
dispatch(notifyApp(createErrorNotification('Saving rich history failed', error.message)));
return richHistory;
}
}
@ -111,7 +111,7 @@ export function updateStarredInRichHistory(richHistory: RichHistoryQuery[], ts:
store.setObject(RICH_HISTORY_KEY, updatedHistory);
return updatedHistory;
} catch (error) {
dispatch(notifyApp(createErrorNotification(error)));
dispatch(notifyApp(createErrorNotification('Saving rich history failed', error.message)));
return richHistory;
}
}
@ -133,7 +133,7 @@ export function updateCommentInRichHistory(
store.setObject(RICH_HISTORY_KEY, updatedHistory);
return updatedHistory;
} catch (error) {
dispatch(notifyApp(createErrorNotification(error)));
dispatch(notifyApp(createErrorNotification('Saving rich history failed', error.message)));
return richHistory;
}
}
@ -144,7 +144,7 @@ export function deleteQueryInRichHistory(richHistory: RichHistoryQuery[], ts: nu
store.setObject(RICH_HISTORY_KEY, updatedHistory);
return updatedHistory;
} catch (error) {
dispatch(notifyApp(createErrorNotification(error)));
dispatch(notifyApp(createErrorNotification('Saving rich history failed', error.message)));
return richHistory;
}
}