# OTPublisherErrorCode Constants Reference

Declared in | OTError.h

### OTPublisherErrorCode

Enumerations of error code values used by [OTPublisherKitDelegate publisher:didFailWithError:].

#### Definition

`typedef NS_ENUM(int32_t, OTPublisherErrorCode ) {
OTPublisherSuccess = 0,
OTSessionDisconnected = 1010,
OTPublisherInternalError = 2000,
OTPublisherWebRTCError = 1610,
OTPublisherEncryptionInternalError = 6001,
EncryptionUnsupportedCodec = 6005,
OTPublisherInvalidScalabilityMode = 6006,
};`

#### Constants

`OTPublisherSuccess`

  Ignore. Used internally.

  Declared In `OTError.h`.

`OTSessionDisconnected`

  Attempting to publish or set captions to a disconnected session.

  Declared In `OTError.h`.

`OTPublisherInternalError`

  Thread dispatch failure, out of memory, etc.

  Declared In `OTError.h`.

`OTPublisherWebRTCError`

  The publisher failed due to a WebRTC error. Check the error description for details.

  Declared In `OTError.h`.

`OTPublisherEncryptionInternalError`

  Internal error while encrypting a packet

  Declared In `OTError.h`.

`EncryptionUnsupportedCodec`

  Unsupported media codec for encryption

  Declared In `OTError.h`.

`OTPublisherInvalidScalabilityMode`

  The scalability mode string passed to setTargetScalabilityMode:error: is nil or not one of the supported values (L1T1–L3T3).

  Declared In `OTError.h`.

#### Declared In

`OTError.h`