Status Events for PubNub JavaScript SDK

Publish

CategoryDescription
PNNetworkIssuesCategoryThe SDK isn't being to able reach PubNub servers because the machine or device are not connected to Internet or this has been lost, your ISP (Internet Service Provider) is having to troubles or perhaps or the SDK is behind of a proxy.
PNBadRequestCategoryThe SDK will return PNBadRequestCategory when are published messages and the instance of the SDK was not initialized with the publishKey. When it notified an error which does not contain the category included, this will be a validation error because the channel or message or even both are been missing in the publication.

Subscription

CategoryNon-Event Engine setupEvent Engine setupBoth setupsDescription
PNNetworkUpCategoryThe SDK detected that the network is online (connection is restored).
PNNetworkDownCategoryThe SDK announces this when a connection isn't available, or when the SDK isn't able to reach PubNub servers.
PNNetworkIssuesCategoryA subscribe event experienced an exception when running. The SDK isn't able to reach PubNub servers.

This may be due to many reasons, like the machine or device isn't connected to the Internet, the Internet connection has been lost, your Internet service provider is having trouble, or the SDK is behind a proxy.
PNConnectedCategoryThe SDK subscribed with a new mix of channels and is ready to receive real-time updates. This is fired every time the channel or channel group mix changes.
PNConnectionErrorCategoryReturned when the previously started subscribe loop failed, and the client disconnected from real-time data channels. It can happen because of permissions errors or because network is down.
PNReconnectedCategoryThe SDK was able to reconnect to PubNub and is ready to receive real-time updates.
PNDisconnectedCategoryPubNub client disconnected from the real-time updates streams.
PNDisconnectedUnexpectedlyCategoryThe connection was unexpectedly disconnected.
PNAccessDeniedCategoryThe PubNub SDK wasn't able to process a request because the authorization key doesn't have read permissions for the required channels/channel groups (Access Manager permission failure).
PNBadRequestCategoryThe server responded with a bad response error because the request is malformed (not all required parameters were provided or the server wasn't able to parse the request).
PNTimeoutCategoryFailure to establish a connection to PubNub due to a timeout (server didn't respond within the specified time frame).
PNRequestMessageCountExceededCategoryThe SDK announces this error if requestMessageCountThreshold is set, and the number of messages received from PubNub (in-memory cache messages) exceeds the threshold. It may suggest that Message Persistence should be enabled on the keyset.
PNUnknownCategoryReturned when the subscriber gets a non-200 HTTP response code from the server (unidentified reasons).
Last updated on