diff --git a/tildes/static/js/scripts.js b/tildes/static/js/scripts.js index 0603a6a..af1ee64 100644 --- a/tildes/static/js/scripts.js +++ b/tildes/static/js/scripts.js @@ -70,6 +70,12 @@ $(function() { if (xhr.status === 413) { errorText = "Too much data submitted"; } + + // check if the response came back as HTML (unhandled error of some sort) + if (errorText.lastIndexOf("", 500) !== -1) { + errorText = "Unknown error"; + } + $statusElement.addClass("form-status-error").text(errorText); } $statusElement.fadeIn("slow");