How to check an error
Errors thrown by the conferencing SDK can come from three places. Tell them apart by the fullcode:
The error object has the same fields as SRTC’s
SdkError: code (full code), baseCode (low 3 digits), and message / msg (English details). The package exports SdkError and MeetingErrorCode (meeting-layer low 3 digits).
- Check
code, not the message text—messages are for developers and logs and change between versions. For messages shown to end users, map codes yourself using the “Suggested user message” column below; don’t showmessagedirectly - The low 3 digits of the meeting layer and the SRTC layer are two independent tables (
206003is “not in a meeting”,106003is “track doesn’t exist”). In the conferencing SDK, compare the fullcode; comparing onlybaseCodemixes them up - Don’t use
instanceof: with the UMD bundle, the SDK ships its own copy of SRTC, which isn’t the same class as an SRTC you import separately
The language parameter
Thelanguage init parameter sets the SDK language (a language tag such as zh-CN or en). It’s a process-wide global setting and also applies to the underlying SRTC:
- Requests to both the meeting server and the SRTC server carry
Accept-Language, and themessageof server business errors (1000–99999) comes back in Chinese or English accordingly - The prompt shown when the browser blocks autoplay uses Chinese or English according to
language; override the text with theautoPlayDialogTextinit parameter - The SDK’s own errors (
206xxx, and passed-through106xxx) are always in English and aren’t affected bylanguage
Meeting-layer error codes
For the cross-platform meaning of the low 3 digits, see Error code format and unified table.Passed-through SRTC error codes
Failures related to capture, permissions, and publishing / subscribing are thrown by the underlying SRTC and passed through unchanged. Common ones:
See SRTC Web error codes for the full list.