Handle the `onerror` case too, please. You can add a simple `console.error` in that case.