This will invoke `.onerror()` not sure, if it is desirable in a sync version.