---
title: ConnectionEnd
description: "A connection that didn't end clean."
---

```python
@final
class ConnectionEnd
```

A connection that didn't end clean.

## Constructor

`ConnectionEnd` declares no `__new__` or `__init__`, so it is not constructed directly: an instance comes back from another call in this package.

## Properties

### `code`

```python
code: int | None
```

The close code or the HTTP status, when the end carried one.

### `detail`

```python
detail: str
```

The daemon's reason, the forwarder's explanation, or the error.

### `kind`

```python
kind: str
```

`"refused"`, `"truncated"`, `"unproven"`, or `"failed"`.

### `peer`

```python
peer: str
```

The local client's address, `host:port`.

## Special methods

### `__repr__`

```python
def __repr__() -> str
```

## Provenance

This page is generated from `bindings/microvms-py/microvms.pyi` by Griffe 2.3.0, run from `site/scripts/gen-reference.mjs` on every `pnpm run sync`, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding's Rust source, then regenerate the declarations with `mise run stubs`. `mise run stubs:check` fails when the committed file no longer matches the source.