fix BadRequest exception