@mux/ai 0.61.0 → 0.62.0

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.
@@ -1015,7 +1015,17 @@ var MUX_AI_ERROR_CODES = {
1015
1015
  /** The dubbing provider doesn't support the requested language. Facts: `language` and `which` (`target` or `source`). */
1016
1016
  DUBBING_LANGUAGE_UNSUPPORTED: "dubbing_language_unsupported",
1017
1017
  /** The dubbing provider ran the dub and reported it failed. Facts: `providerError`, the provider's display text, when it gave one. */
1018
- DUBBING_FAILED: "dubbing_failed"
1018
+ DUBBING_FAILED: "dubbing_failed",
1019
+ /** The dubbing provider didn't finish the dub within the polling budget. Facts: `dubbingId`, `timeoutSeconds`, `lastStatus`. */
1020
+ DUBBING_TIMEOUT: "dubbing_timeout",
1021
+ /** The asset has no audio track, so there is no audio to work with. Facts: `assetId`. */
1022
+ AUDIO_TRACK_MISSING: "audio_track_missing",
1023
+ /** Writing an audio track would replace the asset's primary audio track, which can't be replaced. Facts: `languageCode`, `conflictingTracks`. */
1024
+ PRIMARY_AUDIO_TRACK_CONFLICT: "primary_audio_track_conflict",
1025
+ /** The asset's static rendition settings changed while waiting for its rendition. A new job uses the new settings. Facts: `assetId`. */
1026
+ STATIC_RENDITION_CHANGED: "static_rendition_changed",
1027
+ /** Mux didn't finish the static rendition within the polling budget. Facts: `assetId`, `attempts`, `pollIntervalMs`, `lastStatus`. */
1028
+ STATIC_RENDITION_TIMEOUT: "static_rendition_timeout"
1019
1029
  };
1020
1030
  var MUX_AI_ERROR_CODE_VALUES = Object.values(MUX_AI_ERROR_CODES);
1021
1031
  var MUX_AI_ERROR_CATALOG = {
@@ -1051,8 +1061,8 @@ var MUX_AI_ERROR_CATALOG = {
1051
1061
  [MUX_AI_ERROR_CODES.MODEL_OUTPUT_MISSING]: { type: MUX_AI_ERROR_TYPES.PROCESSING_ERROR, source: MUX_AI_ERROR_SOURCES.UPSTREAM, dependency: MUX_AI_ERROR_DEPENDENCIES.AI_PROVIDER, transient: false, retryable: false },
1052
1062
  [MUX_AI_ERROR_CODES.MODEL_OUTPUT_INVALID]: { type: MUX_AI_ERROR_TYPES.PROCESSING_ERROR, source: MUX_AI_ERROR_SOURCES.UPSTREAM, dependency: MUX_AI_ERROR_DEPENDENCIES.AI_PROVIDER, transient: false, retryable: false },
1053
1063
  [MUX_AI_ERROR_CODES.MODEL_OUTPUT_SUPPRESSED]: { type: MUX_AI_ERROR_TYPES.PROCESSING_ERROR, source: MUX_AI_ERROR_SOURCES.UPSTREAM, dependency: MUX_AI_ERROR_DEPENDENCIES.AI_PROVIDER, transient: false, retryable: false },
1054
- // Not transient: a step retry would repeat a full generation; the job can be resubmitted.
1055
- [MUX_AI_ERROR_CODES.MODEL_OUTPUT_INCOMPLETE]: { type: MUX_AI_ERROR_TYPES.PROCESSING_ERROR, source: MUX_AI_ERROR_SOURCES.UPSTREAM, dependency: MUX_AI_ERROR_DEPENDENCIES.AI_PROVIDER, transient: false },
1064
+ // Not transient: a step retry would repeat a full generation. Retryable: the job can be resubmitted.
1065
+ [MUX_AI_ERROR_CODES.MODEL_OUTPUT_INCOMPLETE]: { type: MUX_AI_ERROR_TYPES.PROCESSING_ERROR, source: MUX_AI_ERROR_SOURCES.UPSTREAM, dependency: MUX_AI_ERROR_DEPENDENCIES.AI_PROVIDER, transient: false, retryable: true },
1056
1066
  [MUX_AI_ERROR_CODES.MODEL_OUTPUT_TRUNCATED]: { type: MUX_AI_ERROR_TYPES.PROCESSING_ERROR, source: MUX_AI_ERROR_SOURCES.INTERNAL, dependency: MUX_AI_ERROR_DEPENDENCIES.AI_PROVIDER },
1057
1067
  // Mux Video.
1058
1068
  // Reported by Mux: a step retry would find the same errored rendition, and resubmitting the same asset errors again.
@@ -1060,7 +1070,16 @@ var MUX_AI_ERROR_CATALOG = {
1060
1070
  // Audio dubbing.
1061
1071
  [MUX_AI_ERROR_CODES.DUBBING_LANGUAGE_UNSUPPORTED]: { type: MUX_AI_ERROR_TYPES.VALIDATION_ERROR, source: MUX_AI_ERROR_SOURCES.REQUEST, dependency: MUX_AI_ERROR_DEPENDENCIES.AI_PROVIDER },
1062
1072
  // Reported by the dubbing provider: a step retry would find the same failed dub.
1063
- [MUX_AI_ERROR_CODES.DUBBING_FAILED]: { type: MUX_AI_ERROR_TYPES.PROCESSING_ERROR, source: MUX_AI_ERROR_SOURCES.UPSTREAM, dependency: MUX_AI_ERROR_DEPENDENCIES.AI_PROVIDER, transient: false }
1073
+ // Retryable by default; each failure sets it from the provider's report.
1074
+ [MUX_AI_ERROR_CODES.DUBBING_FAILED]: { type: MUX_AI_ERROR_TYPES.PROCESSING_ERROR, source: MUX_AI_ERROR_SOURCES.UPSTREAM, dependency: MUX_AI_ERROR_DEPENDENCIES.AI_PROVIDER, transient: false, retryable: true },
1075
+ // Polling timeouts: not transient, since the whole polling budget was already spent,
1076
+ // but retryable, since a later attempt may finish in time.
1077
+ [MUX_AI_ERROR_CODES.DUBBING_TIMEOUT]: { type: MUX_AI_ERROR_TYPES.TIMEOUT_ERROR, source: MUX_AI_ERROR_SOURCES.UPSTREAM, dependency: MUX_AI_ERROR_DEPENDENCIES.AI_PROVIDER, transient: false, retryable: true },
1078
+ [MUX_AI_ERROR_CODES.STATIC_RENDITION_TIMEOUT]: { type: MUX_AI_ERROR_TYPES.TIMEOUT_ERROR, source: MUX_AI_ERROR_SOURCES.UPSTREAM, dependency: MUX_AI_ERROR_DEPENDENCIES.MUX_VIDEO, transient: false, retryable: true },
1079
+ [MUX_AI_ERROR_CODES.AUDIO_TRACK_MISSING]: { type: MUX_AI_ERROR_TYPES.VALIDATION_ERROR, source: MUX_AI_ERROR_SOURCES.ASSET },
1080
+ [MUX_AI_ERROR_CODES.PRIMARY_AUDIO_TRACK_CONFLICT]: { type: MUX_AI_ERROR_TYPES.VALIDATION_ERROR, source: MUX_AI_ERROR_SOURCES.ASSET },
1081
+ // Retryable although asset-sourced: the asset changed mid-run, and a new job uses the new settings.
1082
+ [MUX_AI_ERROR_CODES.STATIC_RENDITION_CHANGED]: { type: MUX_AI_ERROR_TYPES.PROCESSING_ERROR, source: MUX_AI_ERROR_SOURCES.ASSET, retryable: true }
1064
1083
  };
1065
1084
  function isTransientStatus(status) {
1066
1085
  return status === void 0 || status === 408 || status === 425 || status === 429 || status >= 500;