diff --git a/static/js/app.js b/static/js/app.js index 67f5486..5372ec6 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -176,6 +176,7 @@ function handle_ajax_return( "done" in data && "fail" in data && "always" in data ? data.responseJSON ?? {} : data; + if (data.error) alertify.notify(data.error, "error"); if (data.errors) $(data.errors).each(function (idx, error) { alertify.notify(error, "error"); @@ -191,7 +192,7 @@ function handle_ajax_return( alertify.notify(success_message, "success", 5); return true; } - if (!(data.errors && data.errors.length)) + if (!(data.errors && data.errors.length) && !data.error) alertify.notify( default_error ?? _(