pool: change returning of error
remove unused error variable
Update to v2 with a new api