Skip to content

Commit 321380d

Browse files
mjh1emranemran
authored andcommitted
Humanize more input errors
1 parent e2660f6 commit 321380d

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

task/runner.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,10 @@ func humanizeCatalystError(err error) error {
596596
"maximum resolution is",
597597
"unsupported video input",
598598
"scaler position rectangle is outside output frame",
599+
"received non-media manifest",
600+
"no audio frames decoded on",
601+
"there is no frame rate information in the input stream info",
602+
"minimum field value of",
599603
}
600604

601605
// MediaConvert pipeline errors

task/runner_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ func TestHumanizeError(t *testing.T) {
7575

7676
err = NewCatalystError("external transcoder error: job failed: IP Stage runtime error on gpu [0] pipeline. [Scaler position rectangle is outside output frame ]", false)
7777
assert.ErrorIs(humanizeError(err), errInvalidVideo)
78+
79+
err = NewCatalystError("error copying input to storage: failed to copy file(s): error downloading HLS input manifest: received non-Media manifest, but currently only Media playlists are supported", false)
80+
assert.ErrorIs(humanizeError(err), errInvalidVideo)
81+
82+
err = NewCatalystError("external transcoder error: job failed: No audio frames decoded on [selector-(Audio Selector 1)-track-1-drc]", false)
83+
assert.ErrorIs(humanizeError(err), errInvalidVideo)
84+
85+
err = NewCatalystError("external transcoder error: job failed: Frame rate is set to follow, but there is no frame rate information in the input stream info", false)
86+
assert.ErrorIs(humanizeError(err), errInvalidVideo)
87+
88+
err = NewCatalystError("external transcoder error: error creating mediaconvert job: InvalidParameter: 2 validation error(s) found.\n- minimum field value of 32, CreateJobInput.Settings.OutputGroups[0].Outputs[0].VideoDescription.Height.\n- minimum field value of 32, CreateJobInput.Settings.OutputGroups[0].Outputs[1].VideoDescription.Height.\n", false)
89+
assert.ErrorIs(humanizeError(err), errInvalidVideo)
7890
}
7991

8092
func TestSimplePublishErrorDoesNotPanic(t *testing.T) {

0 commit comments

Comments
 (0)