mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-29 22:51:31 +01:00
UI: Show detailed error response on failed secret-engine list call (#13035)
This commit is contained in:
parent
97610c15d3
commit
b66c734aeb
@ -31,14 +31,17 @@ export default ApplicationAdapter.extend({
|
|||||||
mountModel = await this.ajax(this.internalURL(query.path), 'GET');
|
mountModel = await this.ajax(this.internalURL(query.path), 'GET');
|
||||||
// if kv2 then add the config data to the mountModel
|
// if kv2 then add the config data to the mountModel
|
||||||
// version comes in as a string
|
// version comes in as a string
|
||||||
if (mountModel.data.type === 'kv' && mountModel.data.options.version === '2') {
|
if (mountModel?.data?.type === 'kv' && mountModel?.data?.options?.version === '2') {
|
||||||
configModel = await this.ajax(this.urlForConfig(query.path), 'GET');
|
configModel = await this.ajax(this.urlForConfig(query.path), 'GET');
|
||||||
mountModel.data = { ...mountModel.data, ...configModel.data };
|
mountModel.data = { ...mountModel.data, ...configModel.data };
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
// no path means this was an error on listing
|
||||||
|
if (!query.path) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
// control groups will throw a 403 permission denied error. If this happens return the mountModel
|
// control groups will throw a 403 permission denied error. If this happens return the mountModel
|
||||||
// error is handled on routing
|
// error is handled on routing
|
||||||
console.log(error);
|
|
||||||
}
|
}
|
||||||
return mountModel;
|
return mountModel;
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user