Skip to content

Commit

Permalink
viewer app: properly display errors for the delete annotation feature
Browse files Browse the repository at this point in the history
  • Loading branch information
RFSH committed Mar 24, 2022
1 parent c242fbe commit d6b989d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions viewer/annotations/annotations.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
.controller('AnnotationsController', [
'AlertsService', 'annotationCreateForm', 'annotationEditForm', 'annotations',
'AnnotationsService', 'AuthService', 'comments', 'context', 'CommentsService',
'ConfigUtils', 'DataUtils', 'errorMessages', 'InputUtils', 'UriUtils', 'modalUtils',
'ConfigUtils', 'DataUtils', 'errorMessages', 'ErrorService', 'InputUtils', 'UriUtils', 'modalUtils',
'modalBox', 'recordsetDisplayModes', 'recordCreate', 'logService', 'annotationModels',
'viewerConfig', 'viewerConstant', 'viewerAppUtils',
'$q', '$rootScope','$scope', '$timeout', '$uibModal', '$window',
function AnnotationsController(
AlertsService, annotationCreateForm, annotationEditForm, annotations,
AnnotationsService, AuthService, comments, context, CommentsService,
ConfigUtils, DataUtils, errorMessages, InputUtils, UriUtils, modalUtils ,
ConfigUtils, DataUtils, errorMessages, ErrorService, InputUtils, UriUtils, modalUtils ,
modalBox, recordsetDisplayModes, recordCreate, logService, annotationModels,
viewerConfig, viewerConstant, viewerAppUtils,
$q, $rootScope, $scope, $timeout, $uibModal, $window) {
Expand Down Expand Up @@ -1177,7 +1177,8 @@
vm.closeAnnotationForm();
}
}).catch(function (err) {
console.log("error while deleteing:", err);
vm.submissionButtonDisabled = false;
ErrorService.handleException(err, true);
});
}, function () {
// log cancel
Expand Down

0 comments on commit d6b989d

Please sign in to comment.