displays error message when something goes wrong in ajax settings