Handling HTTP Error Messages while using AJAX
Author: hansen@ahp-gmbh.de (-GHAN-)
The situation:
An ajax-request is made and runs into trouble. URouter returns a yellow page with an error code.
The problem:
How can I detect, that something wen't wrong in my script?! I could evaulate the http status but this will ALLWAYS be 200! (which says "ok, done!"). I would suggest it to get somewhat like 5xx (Internal Server Error).
Thats a true dilemma- of course the urouter reacts correct- but the request failed. Is it possible to set a more fitting status as a returncode in order to react properly on such situations?!
How does the LAB handle this!?
-GHAN-
ps: parsing the ajax responseText is NOT an option :)
This page has no comments.