Move verify API away from strings towards error codes.