mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 18:17:55 +00:00
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:
@@ -127,11 +127,15 @@ export default ApplicationAdapter.extend({
|
||||
const backend = snapshot.attr('backend');
|
||||
const id = snapshot.attr('name');
|
||||
const db = snapshot.attr('database');
|
||||
await this._updateAllowedRoles(store, {
|
||||
role: id,
|
||||
backend,
|
||||
db: db[0],
|
||||
});
|
||||
try {
|
||||
await this._updateAllowedRoles(store, {
|
||||
role: id,
|
||||
backend,
|
||||
db: db[0],
|
||||
});
|
||||
} catch (e) {
|
||||
throw new Error('Could not update allowed roles for selected database. Check Vault logs for details');
|
||||
}
|
||||
|
||||
return this.ajax(this.urlFor(backend, id, roleType), 'POST', { data }).then(() => {
|
||||
// ember data doesn't like 204s if it's not a DELETE
|
||||
|
||||
Reference in New Issue
Block a user