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

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

Merged
merged 3 commits into from
Feb 23, 2021

Conversation

chelshaw
Copy link
Contributor

@chelshaw chelshaw commented Feb 23, 2021

This PR fixes an issue where the role create action would fail silently if the underlying connection update fails. Steps to reproduce:

  1. Create an unverified connection in Database secrets engine with a bad/nonexistent database url
  2. Create a role connected to that database
  3. On save, the adapter tries to first add the new role name to the database's list of allowed roles. Before, this would fail silently. Now, we surface a relevant error about what went wrong. Please note that Vault waits for a response from the bad database url, so the save action takes a long time (magnitude of seconds). I also added a loader on the save button so that it is obvious the request is processing

Loader appears when save button is clicked
save-loader

Error appears when it fails on the connection update
error-handled

TODO

  • Check other adapter error surfaces
  • Check happy path on connection + role

@chelshaw chelshaw added ui bug Used to indicate a potential bug labels Feb 23, 2021
@chelshaw chelshaw added this to the 1.7 milestone Feb 23, 2021
@vercel vercel bot temporarily deployed to Preview – vault February 23, 2021 16:26 Inactive
@vercel vercel bot temporarily deployed to Preview – vault-storybook February 23, 2021 16:26 Inactive
@chelshaw chelshaw merged commit 5b68724 into master Feb 23, 2021
@chelshaw chelshaw deleted the ui/handle-role-create-connection-err branch February 23, 2021 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants