Should `exitSelectMode()` be called from `promise.reject()` instead of above in the `request.onerror` on line 1355?