Handling server errors with ajax calls?

I got very used to using jquery's get and post functions which are wrappers around the $.ajax function. However, during development, and even on live sites, sometimes bugs appear, and a fatal error occurs (unforeseen conditions?). Thus the success function never gets fired and nothing happens but your fancybox popup may sit there spinning a little loading icon.

It takes some time to test and move away, but in the end it is worth while to use the $.ajax function where you can define a error function callback. I think in jquery 1.5 they will let you chain things for regular $.get and $.post functions to achieve the same results. But for now I'm converting everything to $.ajax for flexibility in the future. Also I get notified now when there is a 500 error instead of waiting for it to finish or loading up firebug.

Attached images

Century 21 Realty McCoy