Skip to content

Commit

Permalink
runner: add invalid segments to list of invalid errors
Browse files Browse the repository at this point in the history
  • Loading branch information
emranemran committed Mar 19, 2024
1 parent bbe9672 commit 66bc5ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions task/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,9 @@ func humanizeCatalystError(err error) error {
if strings.Contains(errMsg, "error probing") {
return errInvalidVideo
}
if strings.Contains(errMsg, "no valid segments in stream to transcode") {
return errInvalidVideo
}

// Livepeer pipeline errors
if strings.Contains(errMsg, "unsupported input pixel format") {
Expand Down
3 changes: 3 additions & 0 deletions task/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ func TestHumanizeError(t *testing.T) {
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)
assert.ErrorIs(humanizeError(err), errInvalidVideo)

err = NewCatalystError("transcoding failed: no valid segments in stream to transcode", false)
assert.ErrorIs(humanizeError(err), errInvalidVideo)

err = NewCatalystError("error copying input to storage: failed to copy file(s): error copying input file to S3: failed to write to OS URL \"s3+https://storage.googleapis.com/lp-us-catalyst-vod-com/hls/source/bdfgehfe/transfer\": MultipartUpload: upload multipart failed\n\tupload id: ABPnzm6RnhkmNJDt42Vk-cVm7lmNqrPVScIXmjIImSYzxlZ6L0MRhBSn0yfWu6_GNUko9e4\ncaused by: ReadRequestBody: read multipart upload data failed\ncaused by: unexpected EOF", false)
assert.ErrorIs(humanizeError(err), errFileInaccessible)

Expand Down

0 comments on commit 66bc5ba

Please sign in to comment.