Jquery .post Error Handling In Python