should we handle the `onerror` case too?