mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Catch error from sending notification api
This commit is contained in:
parent
2ae3226bdb
commit
1ef862782f
2 changed files with 10 additions and 7 deletions
|
|
@ -24,7 +24,6 @@
|
|||
"@sentry/serverless": "^6.16.1",
|
||||
"axios": "^0.27.2",
|
||||
"dotenv": "^16.0.1",
|
||||
"firebase-admin": "^10.0.2",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"search-query-parser": "^1.6.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,10 +26,14 @@ export const sendNotification = async (
|
|||
notificationType: 'rule',
|
||||
}
|
||||
|
||||
await axios.post(`${apiEndpoint}/notification/send`, data, {
|
||||
headers: {
|
||||
Cookie: `auth=${auth};`,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
})
|
||||
try {
|
||||
await axios.post(`${apiEndpoint}/notification/send`, data, {
|
||||
headers: {
|
||||
Cookie: `auth=${auth};`,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
})
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue