mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Use AJAX status text as default error message.
The ipa_cmd() error handler has been updated to use AJAX status text as the default error message.
This commit is contained in:
parent
6e5b540db2
commit
e0cf3a8313
@ -314,8 +314,12 @@ function ipa_cmd(name, args, options, win_callback, fail_callback, objname, comm
|
||||
}
|
||||
|
||||
function error_handler(xhr, text_status, error_thrown) {
|
||||
|
||||
if (!error_thrown) {
|
||||
error_thrown = {name:'unknown'}
|
||||
error_thrown = {
|
||||
name: xhr.responseText || 'Unknown Error',
|
||||
message: xhr.statusText || 'Unknown Error'
|
||||
}
|
||||
}
|
||||
|
||||
if (xhr.status === 401) {
|
||||
@ -325,10 +329,10 @@ function ipa_cmd(name, args, options, win_callback, fail_callback, objname, comm
|
||||
} else {
|
||||
error_thrown.message =
|
||||
"Your kerberos ticket no longer valid. "+
|
||||
"Please run kinit and then click 'retry'"+
|
||||
"Please run kinit and then click 'retry'. "+
|
||||
"If this is your first time running the IPA Web UI "+
|
||||
"<a href='/ipa//config/unauthorized.html'> "+
|
||||
"Follow these directions</a> to configure your browser."
|
||||
"<a href='/ipa/config/unauthorized.html'>"+
|
||||
"follow these directions</a> to configure your browser."
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user