Ensure package names and versions are encoded properly (in case they have invalid characters, for some reason).  Send error responses from registry to client.