Handling ajax errors.