Skip to content

Commit

Permalink
Merge pull request #8405 from Expensify/marcaaron-includeStackErrorBo…
Browse files Browse the repository at this point in the history
…undary

[No QA] Include error in ErrorBoundary alert log to create more unique tickets
  • Loading branch information
marcaaron authored Apr 1, 2022
2 parents d3e6376 + 8d781e4 commit 50496a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/ErrorBoundary/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import Log from '../../libs/Log';

BaseErrorBoundary.defaultProps.logError = (errorMessage, error, errorInfo) => {
// Log the error to the server
Log.alert(errorMessage, {error: error.message, errorInfo}, false);
Log.alert(`${errorMessage} - ${error.message}`, {errorInfo}, false);
};
export default BaseErrorBoundary;
2 changes: 1 addition & 1 deletion src/components/ErrorBoundary/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Log from '../../libs/Log';

BaseErrorBoundary.defaultProps.logError = (errorMessage, error, errorInfo) => {
// Log the error to the server
Log.alert(errorMessage, {error: error.message, errorInfo}, false);
Log.alert(`${errorMessage} - ${error.message}`, {errorInfo}, false);

/* On native we also log the error to crashlytics
* Since the error was handled we need to manually tell crashlytics about it */
Expand Down

0 comments on commit 50496a0

Please sign in to comment.