# SubscriptionEndKind

URL: https://www.caprid.com/docs/reference/typescript/caprid/relay/index/type-aliases/subscriptionendkind/

```ts
type SubscriptionEndKind = "rejected" | "terminated" | "cancelled";
```

Defined in: [relay-sdks/ts/src/subscription.ts:98](https://github.com/caprids/relay-sdks/blob/main/ts/src/subscription.ts#L98)

The lifecycle name for how a subscription ended: `rejected` when the relay answered the request
with REQUEST_ERROR before accepting it (including the request timeout), `terminated` when an
accepted subscription can no longer deliver (the connection ended, or a REQUEST_ERROR arrived
after acceptance, which is how a refused `update()` is answered, issue #94) or when the connection
ended before any answer, and `cancelled` when the application cancelled it.
