Move bad-request error inside domain