UI: Show detailed error response on failed secret-engine list call (#13035)
This commit is contained in:
parent
e137045050
commit
b4129a1591
|
@ -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…
Reference in New Issue