Skip to content

Commit

Permalink
updated with comments and removed console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
sethkfman committed Aug 1, 2023
1 parent d0cfe1a commit b5a9e1a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/util/sentryUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ function simplifyErrorMessages(report) {
});
}

/**
* This function updates the request URL in the error report.
* It will take the origin and if there is none the with will provide "metamask-mobile"
* @param {Object} report

Check warning on line 78 in app/util/sentryUtils.js

View workflow job for this annotation

GitHub Actions / scripts (lint)

Trailing spaces not allowed

Check failure on line 78 in app/util/sentryUtils.js

View workflow job for this annotation

GitHub Actions / scripts (lint)

Delete `·`
*/
function rewriteReportUrls(report) {
// update request url
console.log('rewriteReportUrls', report);

Check failure on line 82 in app/util/sentryUtils.js

View workflow job for this annotation

GitHub Actions / scripts (lint)

Unexpected console statement
Expand All @@ -98,9 +103,7 @@ function toMetamaskUrl(origUrl) {
return metamaskUrl;

Check failure on line 103 in app/util/sentryUtils.js

View workflow job for this annotation

GitHub Actions / scripts (lint)

Delete `··`
}


function rewriteReport(report) {
console.log('start', report.exception.values[0].stacktrace.frames);
try {
// simplify certain complex error messages (e.g. Ethjs)
simplifyErrorMessages(report);
Expand All @@ -122,8 +125,6 @@ function rewriteReport(report) {
throw err;
}

console.log('Report', report.exception.values[0].stacktrace.frames);

return report;
}

Expand Down

0 comments on commit b5a9e1a

Please sign in to comment.