@bigbinary/neeto-media-recorder 2.7.38 → 2.7.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core.js +5 -2
- package/core.js.map +1 -1
- package/index.js +5 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
package/core.js
CHANGED
|
@@ -760,12 +760,15 @@ var buildRetryableApi = function buildRetryableApi(apiConnector) {
|
|
|
760
760
|
case 0:
|
|
761
761
|
_apiConnectorArgs$con = apiConnectorArgs.config, config = _apiConnectorArgs$con === void 0 ? null : _apiConnectorArgs$con; // If the signal is already aborted before we start, addEventListener("abort")
|
|
762
762
|
// will never fire — so we'd otherwise run the full retry/backoff schedule
|
|
763
|
-
// against an aborted request.
|
|
763
|
+
// against an aborted request. Throw an axios CanceledError so callers'
|
|
764
|
+
// `axios.isCancel` checks treat this as cancellation instead of a real
|
|
765
|
+
// failure (e.g. completeUpload won't flip status to "error" while a
|
|
766
|
+
// parallel abortUpload is finishing).
|
|
764
767
|
if (!(config !== null && config !== void 0 && (_config$signal = config.signal) !== null && _config$signal !== void 0 && _config$signal.aborted)) {
|
|
765
768
|
_context.next = 3;
|
|
766
769
|
break;
|
|
767
770
|
}
|
|
768
|
-
throw new
|
|
771
|
+
throw new axios.CanceledError("Request cancelled");
|
|
769
772
|
case 3:
|
|
770
773
|
remainingAttempts = retries + 1;
|
|
771
774
|
shouldCancelRetries = false;
|