Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ export default class ErrorBoundary extends Component<Props, State> {
const errorMessage =
typeof error === 'object' &&
error !== null &&
error.hasOwnProperty('message')
typeof error.message === 'string'
? error.message
: String(error);
: null;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change prevents us from searching for a matching GitHub issue when we have no unique error message to search with.


const isTimeout = error instanceof TimeoutError;

const callStack =
typeof error === 'object' &&
error !== null &&
error.hasOwnProperty('stack')
typeof error.stack === 'string'
Copy link
Contributor Author

@bvaughn bvaughn Mar 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change prevents us from trying to call String.prototype.split on a non-string value (in the bug report case, undefined).

? error.stack
.split('\n')
.slice(1)
Expand Down