Return an error with WritePublic