Could we add a `onerror` & `onsuccess` instead?