diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 32d4a49..c1d25a3 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -281,5 +281,11 @@ }, "domain_invalid_pattern_error": { "message": "This domain will not work with this version of extension. Please contact TimeCamp support" - } + }, + "timecamp_error_starting_timer": { + "message": "TimeCamp: can not start timer" + }, + "timecamp_error_adding_time_entry": { + "message": "TimeCamp: can not add time entry" + } } diff --git a/scripts-2.0/background.js b/scripts-2.0/background.js index 0247af4..5b98743 100644 --- a/scripts-2.0/background.js +++ b/scripts-2.0/background.js @@ -45,6 +45,7 @@ const TcButton = { resolve(response); }) .catch((e) => { + reject(e); }); break; @@ -54,6 +55,7 @@ const TcButton = { resolve(response); }) .catch((e) => { + reject(e); }); break; diff --git a/scripts-2.0/components/ContextMenu/index.tsx b/scripts-2.0/components/ContextMenu/index.tsx index 36b0649..bbcec53 100644 --- a/scripts-2.0/components/ContextMenu/index.tsx +++ b/scripts-2.0/components/ContextMenu/index.tsx @@ -295,6 +295,8 @@ const ContextMenu: React.FC = (props) => { if(selectedTags.length) { assignTagsToEntry(response.entry_id, selectedTags); } + }).catch(() => { + alert(translate('timecamp_error_starting_timer')); }); }; @@ -312,6 +314,8 @@ const ContextMenu: React.FC = (props) => { if(selectedTags.length) { assignTagsToEntry(response.entry_id, selectedTags); } + }).catch(() => { + alert(translate('timecamp_error_adding_time_entry')); }); };