Detect and show AJAX errors on FormXHR submission handling.

Previously we threw away errore reported by the actual AJAX submission and only used whatever error the browser reported to us; this didn't help if we reached the server ok but had a problem there.
We now extract the #error if given and use that in the alert().
Also should now show 'Unknown error' instead of a crappy generic 'something died in jQuery' when we get a 200 response but bogus return data.
This commit is contained in:
Brion Vibber
2011-03-16 16:10:43 -07:00
parent 2bad1d0cd9
commit 7d202e9c61
2 changed files with 21 additions and 3 deletions

2
js/util.min.js vendored

File diff suppressed because one or more lines are too long