Skip to main content
The error type the SDK throws is SMeetingError, a semantic Swift enum that also provides an integer error code.
  • Use switch to branch on meaning
  • Use error.code to get the integer error code, handy for logs and support tickets
  • Use error.message to get a plain-text description
  • error.localizedDescription outputs "<code>: <message>"

Error list


Error code format

SMeetingError.code returns the full, assembled error code:
  • Client errors (those in the table above whose client code is less than 1000) get a platform prefix, forming a 6-digit number: the iOS prefix is 203, and the macOS prefix is 205
  • Errors passed through from the server (apiError with a server code of 1000 or greater) are kept as-is, without a prefix
Examples: This lets you tell at a glance whether an error was “stopped by the client itself” or “returned by the server.”

Common sources of unauthorized

This is the error you’re most likely to run into, and it almost always comes from room policies: We recommend graying out buttons in the UI in advance based on RoomInfo, rather than letting users tap them and then get an error.
Key points:
  • Besides SMeetingError, the underlying audio and video layer may also throw its own error types (for example, capture failures or connection failures), so don’t omit the catch-all catch branch
  • Prefer error.message when showing messages to end users; use error.localizedDescription when writing logs, because it includes the error code
  • SMeetingError conforms to Equatable, so you can compare it directly with a specific case

APIs that don’t throw

The following APIs are designed not to throw, so you can call them directly; repeated calls or calls in a mismatched state are safely ignored:
  • logout()
  • exitRoom()
  • closeMic() / closeCamera() / stopShare()
  • disableIm()
  • toggleRemoteAudioMute(_:)
  • getRoomInfo() / getWhiteBoard() / getUsersInfo() / getUsersInfoList() / getRemoteVideoTrack(uid:desc:) / getDevices(kind:)