We should set error status and message for task here instead of raising bad request.