mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-15 09:08:57 +00:00
window: AuthEditBase: include more information in thrown errors
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
This commit is contained in:
parent
5156cd1164
commit
3822a031dd
@ -29,9 +29,9 @@ Ext.define('Proxmox.window.AuthEditBase', {
|
|||||||
|
|
||||||
let authConfig = Proxmox.Schema.authDomains[me.authType];
|
let authConfig = Proxmox.Schema.authDomains[me.authType];
|
||||||
if (!authConfig) {
|
if (!authConfig) {
|
||||||
throw 'unknown auth type';
|
throw `unknown auth type ${me.authType}`;
|
||||||
} else if (!authConfig.add && me.isCreate) {
|
} else if (!authConfig.add && me.isCreate) {
|
||||||
throw 'trying to add non addable realm';
|
throw `trying to add non addable realm of type ${me.authType}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
me.subject = authConfig.name;
|
me.subject = authConfig.name;
|
||||||
@ -86,9 +86,9 @@ Ext.define('Proxmox.window.AuthEditBase', {
|
|||||||
var data = response.result.data || {};
|
var data = response.result.data || {};
|
||||||
// just to be sure (should not happen)
|
// just to be sure (should not happen)
|
||||||
// only check this when the type is not in the api path
|
// only check this when the type is not in the api path
|
||||||
if (!me.useTypeInUrl && data.type !== me.authType) {
|
if (!me.useTypeInUrl && data.realm !== me.authType) {
|
||||||
me.close();
|
me.close();
|
||||||
throw "got wrong auth type";
|
throw `got wrong auth type '${me.authType}' for realm '${data.realm}'`;
|
||||||
}
|
}
|
||||||
me.setValues(data);
|
me.setValues(data);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user