potion-voice folder sans git folder before changes

This commit is contained in:
2026-10-07 16:04:00 -04:00
parent 3d360319ef
commit b0f1ec0029
98 changed files with 3285398 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
const Bugsnag = require('@bugsnag/js')
const DEV_APP_ENVS = ['local-dev', 'development']
const handleError = (err, user) => {
const isDevEnv = DEV_APP_ENVS.includes(process.env.POTION_APP_ENV)
if (isDevEnv) {
return
}
if (user)
Bugsnag.notify(err, function (event) {
event.setUser(user._id, user.email, user.name)
})
else Bugsnag.notify(err)
}
module.exports = handleError