I use an iframe to display several documents in an iframe with dynamic src. Some of them exist, but some others do not and I receive a 404 Error. Please find my code below:
<iframe class="e2e-iframe-trusted-src" style="width: 100%" height="1000"
[src]="trustedUrl" (load)="oniFrameLoad($event)"></iframe>
Please let me know how I can handle the 404 error (or even better know beforehand that the src path does not exist and the document is not displayable).