I think you want return `new Future.error(...)` here.