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

Fixes #18900: Missing exception details in change request update #3503

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 @@ -267,7 +267,7 @@ class DependencyAndDeletionServiceImpl(
for {
con <- ldap
configRules <- searchRules(con,id)
diff <- woDirectiveRepository.delete(id, modId, actor, reason).chainError(s"Error when deleting policy instanc with ID '${id.value}'.")
diff <- woDirectiveRepository.delete(id, modId, actor, reason).chainError(s"Error when deleting policy instance with ID '${id.value}'.")
updatedRules <- ZIO.foreach(configRules) { rule =>
//check that directive is actually in rule directives, and remove it
if(rule.directiveIds.exists(i => id == i)) {
Expand Down
Expand Up @@ -538,6 +538,7 @@ class ModificationValidationPopup(
case eb:EmptyBox =>
val e = eb ?~! "Error when moving the group (no change request was created)"
//early return here
logger.error(e.messageChain)
e.chain.foreach { ex =>
Copy link
Member Author

Choose a reason for hiding this comment

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

the foreach here only tests the e parent (ie eb) exists and is non-empty and display its messageChain but doesn't log it (I'm not sure why, but I prefer not to change that).

parentFormTracker.addFormError(error(ex.messageChain))
logger.error(s"Exception when trying to update a change request:", ex)
Expand Down Expand Up @@ -569,6 +570,7 @@ class ModificationValidationPopup(
onSuccessCallback(id)
case eb:EmptyBox =>
val e = (eb ?~! "Error when trying to save your modification")
logger.error(e.messageChain)
e.chain.foreach { ex =>
parentFormTracker.addFormError(error(ex.messageChain))
logger.error(s"Exception when trying to update a change request:", ex)
Expand Down