MemPalace/mempalace · error · TransportError

{url}: {exc}

Error message

{url}: {exc}

What it means

Error "{url}: {exc}" thrown in MemPalace/mempalace.

Source

Thrown at mempalace/transport.py:103

    for peer in peers:
        if not isinstance(peer, dict) or not peer.get("url"):
            raise ValueError(f"{path}: every peer needs at least a 'url'")
    return peers


def http_request(base_url: str, token: str, path: str, params: dict = None) -> dict:
    """The HTTPS wire primitive: one bearer-authenticated GET, JSON back."""
    url = base_url.rstrip("/") + path
    if params:
        url += "?" + urllib.parse.urlencode(params)
    request = urllib.request.Request(url)
    if token:
        request.add_header("Authorization", f"Bearer {token}")
    try:
        with urllib.request.urlopen(request, timeout=_http_timeout_s()) as response:
            return json.loads(response.read().decode("utf-8"))
    except (urllib.error.URLError, TimeoutError, ValueError) as exc:
        raise TransportError(f"{url}: {exc}") from None


class Transport(ABC):
    """The seam. Layer 2 holds one of these and nothing else network-shaped."""

    @abstractmethod
    def self_id(self) -> str:
        """Stable ReplicaId of this node."""

    @abstractmethod
    def peers(self) -> list[dict]:
        """Current membership snapshot. Each peer dict carries at least
        ``name``; transport-specific addressing fields are opaque to
        Layer 2, which only ever hands the dict back to :meth:`request`."""

    @abstractmethod
    def request(self, peer: dict, path: str, params: Optional[dict] = None) -> dict:
        """One authenticated round-trip to ``peer``. Raises TransportError."""

View on GitHub (pinned to 06cb6987f0)

Solutions

  1. Check the peer URL and that the peer is reachable

When it happens

Trigger: Thrown at mempalace/transport.py:103 when the library encounters an invalid state.

Common situations: Request to a sync peer failed.


AI-assisted analysis of MemPalace/mempalace@06cb6987f0 (2026-08-15). Data as JSON: /api/errors/4267cf254ac13988. Report an issue: GitHub.