Annotations: Ignore cancelled annotation queries (#26681)

This commit is contained in:
Torkel Ödegaard 2020-07-30 10:23:39 +02:00 committed by GitHub
parent eb0b9de044
commit 3f21283655
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,9 +59,14 @@ export class AnnotationsSrv {
};
})
.catch(err => {
if (err.cancelled) {
return [];
}
if (!err.message && err.data && err.data.message) {
err.message = err.data.message;
}
console.error('AnnotationSrv.query error', err);
appEvents.emit(AppEvents.alertError, ['Annotation Query Failed', err.message || err]);
return [];