UI: Show error when connection roles fail to update on role create (#10980)

* Show error  when connection roles fail to update on role create

* Clean up errors for role, remove bad state setting after transition

* Add changelog
This commit is contained in:
Chelsea Shaw
2021-02-23 10:47:02 -06:00
committed by GitHub
parent 76584d2749
commit 5b68724e31
5 changed files with 36 additions and 32 deletions

View File

@@ -8,7 +8,7 @@ const SHOW_ROUTE = 'vault.cluster.secrets.backend.show';
const getErrorMessage = errors => {
let errorMessage = errors?.join('. ') || 'Something went wrong. Check the Vault logs for more information.';
if (errors?.join(' ').indexOf('failed to verify')) {
if (errorMessage.indexOf('failed to verify') >= 0) {
errorMessage =
'There was a verification error for this connection. Check the Vault logs for more information.';
}