catch invalid request errors