Skip to main content
Android SRTC error codes fall into two categories:
  • StatusCode: a mirror of the native status codes defined by librtc, mainly in the 100xxx range.
  • cn.seastart.rtc.error: domain-specific 102xxx error codes produced by the Android SDK itself.
Callback parameters always use Int and keep the original value. Errors returned by native code, the backend, the HTTP library, or media streaming vendors are not remapped, so callers must keep a fallback for unknown error codes.

librtc status codes StatusCode

DeviceNotfound from older docs has been removed; the current enum name for 100011 is NotFound. LibRtcStatusCode has also been removed, and librtc constants are exposed only through StatusCode.

SDK common and channel errors

RtcCommonErrorCode

RtcChannelErrorCode

Capture errors

RtcCameraErrorCode

RtcMicErrorCode

RtcScreenErrorCode

Media streaming and HTTP errors

RtcStreamErrorCode

RtcHttpErrorCode

Error catalog lookup

RtcErrorCatalog only looks up the SDK’s own 102xxx errors. It returns null for librtc, backend, and vendor pass-through codes.
RtcErrorDescriptor fields: RtcErrorCatalog.all returns descriptors for all errors produced by the current SDK. RtcErrorModule domains and their reserved ranges: COMMON and CHANNEL currently share a historical range, but each specific error code is globally unique. Call RtcErrorModule.owns(code) to check whether an SDK-produced error falls within that domain’s reserved range; this is not the same as checking whether the error is formally defined in RtcErrorCatalog.

Callback handling recommendations

  • RTCClientEvent.onJoinFailed(channel, statusCode): handle join failures.
  • RTCResultListener.onFail(code): handle failures of specific asynchronous operations.
  • RTCEngineEvent.onError(channelId, errorCode, message): handle blocking errors from Engine operations, and global errors.
  • RTCClientEvent.onDisconnected(channel, leaveReason, statusCode, message): handle unrecoverable channel disconnects.
When logging errors, keep the channel ID, the raw numeric value, and the runtime message together. Don’t rely only on enums or RtcErrorCatalog; otherwise new upstream errors the SDK doesn’t recognize yet will be lost.