[fix] wrong exception thrown on bad request