Skip to content

Commit

Permalink
Catch Notifications Errors on Details Pages (#197)
Browse files Browse the repository at this point in the history
* add catch statements to notifications get_configs to avoid crashing details pages
Signed-off by: David Cui <[email protected]>

* remove console log statment
Signed-off by: David Cui <[email protected]>
  • Loading branch information
davidcui1225 authored Nov 1, 2021
1 parent 56008de commit 677fbab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ export function ReportDefinitionDetails(props: { match?: any; setBreadcrumbs?: a
setChannels(availableChannels);
return availableChannels;
})
.catch((error: any) => {
console.log('error when retrieving notification configs:', error);
})
.then((availableChannels: any) => {
httpClient
.get(`../api/reporting/reportDefinitions/${reportDefinitionId}`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ export function ReportDetails(props: { match?: any; setBreadcrumbs?: any; httpCl
let availableChannels = getAvailableNotificationsChannels(response.config_list);
return availableChannels;
})
.catch((error: any) => {
console.log('error when retrieving notification configs:', error);
})
.then((availableChannels: any) => {
httpClient
.get('../api/reporting/reports/' + reportId)
Expand Down

0 comments on commit 677fbab

Please sign in to comment.