Skip to content

Commit

Permalink
Handle exception errors (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwatson484 authored Oct 7, 2024
1 parent ac6c816 commit 8460e21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/insights.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ const setup = () => {

const trackException = (error) => {
if (appInsights.defaultClient) {
appInsights.defaultClient.trackException({ exception: error })
try {
appInsights.defaultClient.trackException({ exception: error })
} catch (err) {
console.log('Error tracking exception', err)
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ffc-ice-crm",
"version": "0.1.15",
"version": "0.1.16",
"description": "CRM Microservice",
"homepage": "https://github.com/DEFRA/ffc-ice-crm",
"main": "app/index.js",
Expand Down

0 comments on commit 8460e21

Please sign in to comment.