handle bad request errors