Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message JSON path fixes in Editor Angular Controllers #6029

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -119,7 +119,7 @@
deferred.resolve(data);
}, function(reason) {
$rootScope.$broadcast('StatusUpdated', {
title: reason.data.description,
title: reason.data.description, //returned error JSON obj
timeout: 0,
type: 'danger'
});
Expand Down
4 changes: 2 additions & 2 deletions web-ui/src/main/resources/catalog/js/edit/EditorController.js
Expand Up @@ -570,8 +570,8 @@
closeEditor();
}, function(reason) {
$rootScope.$broadcast('StatusUpdated', {
title: $translate.instant(reason.data.error.message),
error: reason.data.error.description,
title: reason.data.message, //returned error JSON obj
error: reason.data.description,
Copy link
Member

Choose a reason for hiding this comment

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

To confirm: has the code been reviewed to verify reason.data.error.message and reason.data.error.description are not used?

Otherwise, I would used the new properties as a fallback if the original ones are not returned.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@josegar74

The "reason.data.error.message" and "reason.data.error.description" are not used for this Angular module. I don't think it's a property but it's a JSON returned from the API side.

timeout: 0,
type: 'danger'
});
Expand Down