---
source_url: https://www.pubnub.com/docs/sdks/c-sharp/status-events
title: Status Events for C# SDK
updated_at: 2026-05-29T11:10:16.943Z
sdk_name: PubNub C# SDK
sdk_version: 8.2.0
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# Status Events for C# SDK

PubNub C# SDK, use the latest version: 8.2.0

Install:

```bash
dotnet add package PubNub@8.2.0
```

The PubNub C# Software Development Kit (SDK) reports status events that describe connection state and error conditions. This page explains each status and when it appears.

:::warning Subscribe loop
These status events apply to the latest subscription loop architecture introduced in version 6.20.0 and enabled by default in version 7.0.0.
:::

The PubNub C# SDK provides status events to notify you about the state of the SDK through the `PNStatusCategory` enum and `PNException` types.

## Subscription-related statuses

| Status | Description |
| --- | --- |
| `PNConnectedCategory` | The connection has been established and is ready to receive real-time updates. |
| `PNDisconnectedCategory` | The connection has been intentionally terminated. |
| `PNUnexpectedDisconnectCategory` | The connection was unexpectedly disconnected. |
| `PNConnectionErrorCategory` | Failed to establish the initial connection, with details about the error. |
| `PNSubscriptionChangedCategory` | The mix of subscribed channels and channel groups has changed. This event returns two lists: one with all subscribed channels and the second with all subscribed channel groups. |

### Previous status categories

| Status | Description | Deprecated in version | Removed in version |
| --- | --- | --- | --- |
| `PNReconnectedCategory` | SDK was able to reconnect to PubNub. Now handled internally without a specific status. For more information on reconnection, refer to [Configuration](https://www.pubnub.com/docs/sdks/c-sharp/api-reference/configuration#reconnection-policy). | 6.20.0 | Not removed |
| `PNAcknowledgmentCategory` | An API call was successful. This status has additional details based on the type of the successful operation. Now handled with operation-specific success callbacks. | 6.20.0 | Not removed |
| `PNTimeoutCategory` | Used when an API operation didn't receive a response from the server in time. Now represented by specific exceptions. | 6.20.0 | Not removed |
| `PNRequestMessageCountExceededCategory` | Received more messages than specified threshold. No direct equivalent; use operation-specific callbacks. | 6.20.0 | Not removed |
| `PNNetworkIssuesCategory` | Indicated network connectivity problems. Now represented as more specific status categories. | 6.20.0 | Not removed |
| `PNMalformedResponseCategory` | PubNub sent a malformed response. This may happen when you connect to a public WiFi that requires you to log in via your web browser first, there is a proxy somewhere returning an HTML access denied error, or if there was an intermittent server issue. This status category is not actively emitted. Malformed responses now trigger a `PNUnexpectedDisconnectCategory` status with appropriate error details. | 6.20.0 | Not removed |

:::tip SDK connection lifecycle
Intermediate states like connecting and reconnecting are now handled internally without emitting specific statuses. For more general information on statuses and reconnection policies, refer to [SDK Connection Lifecycle](https://www.pubnub.com/docs/general/setup/connection-management#sdk-connection-lifecycle).
:::

## Other statuses

The SDK provides additional statuses for various operations:

| Status | Description |
| --- | --- |
| `PNAccessDeniedCategory` | Authorization failed, usually due to invalid keys or token. |
| `PNCancelledCategory` | The operation was cancelled before completion. |
| `PNDecryptionErrorCategory` | Message decryption failed, likely due to incorrect crypto key. |
| `PNTLSConnectionFailedCategory` | Secure connection failed due to TLS/SSL issues. |
| `PNTLSUntrustedCertificateCategory` | TLS certificate validation failed. |
| `PNBadRequestCategory` | The SDK is missing some required parameters, like `message`, `channel`, `subscribe key`, `publish key`. |
| `PNNetworkIssuesCategory` | The SDK is not able to reach PubNub servers because the machine or device doesn't have Internet connection or the SDK is behind a proxy. |
| `PNTimeoutCategory` | Processing has failed because of request timeout. |
| `PNNetworkIssuesCategory` | The SDK is not able to reach PubNub servers because the machine or device doesn't have Internet connection or the SDK is behind a proxy. |
| `PNUnknownCategory` | The captured `error` is a minor client-side `error` or an unknown type at the time of SDK development. |
| `PNBadRequestCategory` | The SDK is missing some required parameters, like `subscribe key` or `publish key`. |
| `PNTimeoutCategory` | Processing has failed because of request timeout. |
| `PNReconnectedCategory` | SDK was able to reconnect to PubNub. |

## Error events

The C# SDK uses `PNException` to provide detailed error information. Most errors are returned in the exception property of the `PNStatus` object.

### Common error types

| Error Code | Description |
| --- | --- |
| `None` | No error occurred. |
| `NameResolutionFailure` | DNS resolution failed. Please check network connectivity. |
| `PublishOperationTimeout` | A publish operation timed out. |
| `ReceiveFailure` | Failed to receive data from the server. |
| `ConnectFailure` | Failed to connect to the server. Please verify network reachability. |
| `WebRequestCanceled` | Request was cancelled before completion. |
| `NoInternet` | No internet connection detected. |
| `UnsubscribedAfterMaxRetries` | Unsubscribed after maximum retry attempts were exhausted. |
| `MessageTooLarge` | Message exceeded size limits. |

### Key-related errors

| Error Code | Description |
| --- | --- |
| `InvalidKey` | The key provided is invalid. |
| `InvalidSubscribeKey` | The subscribe key is invalid or missing. |
| `NoUuidSpecified` | No UUID was specified. |

### Resource errors

| Error Code | Description |
| --- | --- |
| `InvalidChannel` | A required channel parameter is invalid or missing. |
| `NotSubscribed` | Operation attempted on a channel to which you're not subscribed. |
| `DuplicateChannel` | Attempted to subscribe to a channel you're already subscribed to. |
| `EmptyGroupSubscription` | Cannot subscribe to an empty channel group. |
| `InvalidTimestamp` | The timestamp provided is invalid. |