[fb] Wrong error message in UI with 500 error when user tries to edit read_only file in File browser
@@ -2454,7 +2454,12 @@ from filebrowser.conf import ENABLE_EXTRACT_UPLOADED_ARCHIVE
$.ajaxSetup({
error:function (x, e) {
if (x.status == 500 && x.responseText.indexOf("jobbrowser") == -1) {
+ if (x.responseJSON && x.responseJSON.detail) {
+ $(document).trigger("error", x.responseJSON.detail);
+ }
+ else {
$(document).trigger("error", "${_('There was a problem with your request.')}");
+ }
$("#hueBreadcrumbText").blur();
}
}
