useImFusionError
ts
function useImFusionError(): Error;Returns the SDK initialization error.
Throws if no error has occurred. Safe to call inside ImFusionError.
Returns
The initialization Error
Throws
If called outside of an ImFusionProvider
Throws
If called when there is no error
Example
tsx
function ErrorDisplay() {
const error = useImFusionError();
return <p>Failed to initialize: {error.message}</p>;
}