Skip to main content

@dialstack/sdk-dev / react/src/softphone / UseLastError

Interface: UseLastError

Defined in: sdk/react/src/react/softphone/hooks/useLastError.ts:8

Properties​

clearError​

TypeScript
clearError: () => void;

Defined in: sdk/react/src/react/softphone/hooks/useLastError.ts:17

Dismiss the current error.

Returns​

void


handleError​

TypeScript
handleError: (event) => void;

Defined in: sdk/react/src/react/softphone/hooks/useLastError.ts:15

Error handler to pass into useCalls/useCallActions. It forwards to the host's onError AND stores the error locally so the built-in UI can show it.

Parameters​

event​

SoftphoneError

Returns​

void


lastError​

TypeScript
lastError: SoftphoneError | null;

Defined in: sdk/react/src/react/softphone/hooks/useLastError.ts:10

The last error surfaced to the user, or null. Drives the built-in banner.