Skip to content

http

http

What both halves of the serve client put on the wire.

A trace and an installed block reach a server the same way — the same headers, the same timeouts, the same reading of a non-200 — but from two unrelated places: LocalServeBackend sends the trace, and ServeRegistration sends the block. Keeping the wire details here is what stops the two from drifting; the error message in particular is one a user reads, and two copies of it would diverge on the first edit.

CONNECT_TIMEOUT module-attribute

CONNECT_TIMEOUT: float = 10.0

READ_TIMEOUT module-attribute

READ_TIMEOUT: float = 600.0

timeout

timeout() -> Any

headers

headers(api_key: Optional[str] = None, compress: bool = False) -> dict

The headers every nnsight-serve request carries.

check

check(response: Any) -> None

Raise the server's own explanation of a non-200, as a ConnectionError.

A transport or service failure, as distinct from an error inside the trace — that one comes back in the body as a deferred error and is re-raised at the client with its real type.