Skip to content

Commit

Permalink
trying to ignore HTTP cancellation 'errors'
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Aug 19, 2020
1 parent 62ed45c commit 9d73051
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/components/ErrorBoundary/ErrorBoundary.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ class ErrorBoundary extends Component {
}

componentDidCatch(error, info) {
// ignore HTTP cancellation "errors"
if (
error &&
"response" in error &&
error.response &&
"status" in error.reponse &&
error.reponse.status === 0
) {
return;
}

// Send error to Airbrake
this.airbrake.notify({
error: error,
Expand Down

0 comments on commit 9d73051

Please sign in to comment.