This is not strictly correct as there is a case in poolAdd can return an err with nil c for unknown type. Maybe check both err and c != nil here.

Also could you add a test in `server_unit_test.go`