I am trying to replace Iframe with image or text when URL in it refused to connect but I could not handle this error I don't want to solve x-frame-options error I want to handle it to show image or message when iframe can't connect exm1 ==> this URL working
<iframe key={random} src="https://www.youtube.com/embed/b4i7j6U7Ul8" width="100%" height="100%" sandbox="allow-scripts allow-same-origin allow-presentation" loading='lazy'/>
exm2 ==> this not work
<iframe key={random} src="https://www.google.com" width="100%" height="100%" sandbox="allow-scripts allow-same-origin allow-presentation" loading='lazy'/>
I want to replace Iframe tag when Url refused to connect with image or text