Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolmello committed Feb 28, 2020
1 parent 384e1d4 commit 8f252ea
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/utils/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,23 @@ export const { analytics } = firebase;
export const loggerConfig = bugsnag.config;
export const { leaveBreadcrumb } = bugsnag;

let metadata = {};

export const bugsnagServerVersion = (serverVersion) => {
bugsnag.metaData = {
metadata = {
serverVersion
};
};

export default (e) => {
if (e instanceof Error && !__DEV__) {
bugsnag.notify(e);
bugsnag.notify(e, (report) => {
report.metadata = {
details: {
...metadata
}
};
});
} else {
console.log(e);
}
Expand Down

0 comments on commit 8f252ea

Please sign in to comment.