Removed sensitive info from UI/API when volume attach/detach fails (#4476)

* Removed sensitive info from UI when attach/detach fails

* minor formatting change
This commit is contained in:
Spaceman1984 2020-11-19 01:09:37 +02:00 committed by GitHub
parent 735b6de296
commit 87e1fa9e02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -2248,15 +2248,16 @@ public class VmwareStorageProcessor implements StorageProcessor {
String msg = "";
if (isAttach) {
msg += "Failed to attach volume: " + e.getMessage();
msg += "Failed to attach volume: ";
}
else {
msg += "Failed to detach volume: " + e.getMessage();
msg += "Failed to detach volume: ";
}
s_logger.error(msg, e);
s_logger.error(msg + e.getMessage(), e);
return new AttachAnswer(msg);
// Sending empty error message - too many duplicate errors in UI
return new AttachAnswer("");
}
}