Skip to main content
useDailyError() : Object
Keep in mind that an error event will cause a participant to be ejected immediately from a meeting. If you need to render UI based on the meetingError state, make sure that you don’t destroy the callObject instance until you no longer need the error state. This includes updating any props for DailyProvider as we’ll destroy the current callObject instance internally in order to setup a new one with the updated props.

Return value

An object with the following properties:
meetingError
Object
The most recent event object from the error event.
nonFatalError
Object
The most recent event object from the nonfatal-error event.

Example

import { useDailyError } from '@daily-co/daily-react';

export const MyMeetingState = () => {
  const { meetingError, nonFatalError } = useDailyError();

  return (
    <div>
      <p>Most recent meeting error: {meetingError?.errorMsg}</p>
      <p>Most recent nonfatal error: {nonFatalError?.errorMsg}</p>
    </div>
  );
};

See also