allow throwing custom ajax error if non ajax request