Error handling

React

You receive Dyte meeting related errors in the onError callback.

Currently there are 3 types of errors we emit.

DyteErrors {
    CLIENTID_INVALID,
    MEETING_UNAUTHORIZED,
    MEETING_NOTFOUND
}

You can handle them like in the example below.

import { DyteMeeting, DyteErrors } from "@dytesdk/mobile";

function App() {
    const onError = (error) => {
        if (error = DyteErrors.MEETING_NOTFOUND) {
            // take appropriate action
        }
    }

    return (
        <div className="App">
            <DyteMeeting
                onInit={(meeting: Meeting) => { }}
                onError={onError}
                clientId={`orgId || clientId`}
                meetingConfig={{
                    roomName: `roomName`,
                    authToken: `authToken`,
                }}
            />
        </div>
    );
}

export default App;