Besides a 404 or other comm. error, I was thinking about a situation where a user enters info into a form that is submitted as an ajax request, but the server-side verification determines there is an error. I need a way to send back a "flexible" response that I can parse and update the client display w/ the appropriate error message, or new data, etc.
I ultimately opted for XML reponse because I could structure it to contain all the needed elements, and just have javascript walk the document tree and determine if there was overall any error, or whether to show a success message, or what data to update the screen with. Something like this:
<?xml verison="1.0"?>
<ajax_resp>
<errors />
<messages>
<message>User added</message>
</messages>
<data>
<record id="4"><username>Some user</username></record>
</data>
</ajax_resp>
It was more work but is more flexible than just having server return HTML, so for now I'm hooked on the idea of sending back an XML response.