[jQuery] how to capture error 500/404 ?

[jQuery] how to capture error 500/404 ?


Hi,
how to capture error that produced by server (err 505 or 404) inside
$.post() and $.get() ?
thanks !!!