diff --git a/src/libs/bugsnag/index.web.js b/src/libs/bugsnag/index.web.js index 54247a39..b3973f85 100644 --- a/src/libs/bugsnag/index.web.js +++ b/src/libs/bugsnag/index.web.js @@ -5,6 +5,15 @@ import Bugsnag from 'bugsnag-js' export default apiKey => { Bugsnag.apiKey = apiKey + + Bugsnag.clearUser = () => (Bugsnag.user = null) + + Bugsnag.setUser = (id, name, email, other = {}) => + (Bugsnag.user = { id, name, email, ...other }) + + Bugsnag.notify = Bugsnag.notifyException + delete Bugsnag.notifyException + return Bugsnag }