We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TaskCancelation
1 parent 1336a76 commit 1b82371Copy full SHA for 1b82371
app/routes/crate/version.js
@@ -2,6 +2,7 @@ import Route from '@ember/routing/route';
2
import { inject as service } from '@ember/service';
3
4
import * as Sentry from '@sentry/browser';
5
+import { didCancel } from 'ember-concurrency';
6
7
import { AjaxError } from '../../utils/ajax';
8
@@ -44,7 +45,7 @@ export default class VersionRoute extends Route {
44
45
if (!crate.documentation || crate.documentation.startsWith('https://docs.rs/')) {
46
version.loadDocsBuildsTask.perform().catch(error => {
47
// report unexpected errors to Sentry and ignore `ajax()` errors
- if (!(error instanceof AjaxError)) {
48
+ if (!didCancel(error) && !(error instanceof AjaxError)) {
49
Sentry.captureException(error);
50
}
51
});
0 commit comments