mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Correctly handle error 500 (#166)
* [fix] Correctly handle error 500 * [fix] Use 'em' instead of 'emph'
This commit is contained in:
parent
9fbae57aff
commit
382b81a664
2 changed files with 8 additions and 1 deletions
|
@ -133,6 +133,13 @@
|
|||
c.redirect('#/login');
|
||||
}
|
||||
}
|
||||
// 500
|
||||
else if (xhr.status == 500) {
|
||||
error_log = JSON.parse(xhr.responseText);
|
||||
error_log.route = error_log.route.join(' ') + '\n';
|
||||
error_log.arguments = JSON.stringify(error_log.arguments);
|
||||
c.flash('fail', y18n.t('internal_exception', [error_log.route, error_log.arguments, error_log.traceback]));
|
||||
}
|
||||
// 502 Bad gateway means API is down
|
||||
else if (xhr.status == 502) {
|
||||
c.flash('fail', y18n.t('api_not_responding'));
|
||||
|
|
|
@ -159,6 +159,7 @@
|
|||
"installed_apps": "Installed apps",
|
||||
"installing": "Installing",
|
||||
"interface": "Interface",
|
||||
"internal_exception": "<strong>Yunohost encountered an internal error :/</strong><br><em>Really sorry about that.<br>You should look for help on <a href=\"https://forum.yunohost.org/\">the forum</a> or <a href=\"https://chat.yunohost.org/\">the chat</a> to fix the situation, or report the bug on <a href=\"https://dev.yunohost.org/projects/yunohost/issues\">the bugtracker</a>.</em><br>The following information might be useful for the person helping you :<h3>Action</h3><pre>%s%s</pre><h3>Traceback</h3><pre>%s</pre>",
|
||||
"io": "I/O",
|
||||
"ipv4": "IPv4",
|
||||
"ipv6": "IPv6",
|
||||
|
@ -345,4 +346,3 @@
|
|||
"install_community_appslists_warning" : "Note that these applications packages are <strong>not</strong> official and not maintained by the YunoHost team.<br />Installing these applications is at your own risk and could break your system.",
|
||||
"install_custom_app_appslists_info" : "Note that you can use alternative applications lists to install some other apps maintained by the YunoHost community."
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue