Skip to content

Commit

Permalink
feat: when mediaconvert job fails log message
Browse files Browse the repository at this point in the history
  • Loading branch information
oshinongit committed Sep 30, 2024
1 parent df4ce7f commit 883f2ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pipelines/aws/aws-pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,18 @@ export default class AWSPipeline implements Pipeline {
AccelerationSettings: { Mode: this.configuration.accelerationMode }
}
: {};
await this.mediaConvert.send(
const response = await this.mediaConvert.send(
new CreateJobCommand({
Role: this.configuration.mediaConvertRole,
Settings: settings,
...accelerationSettings
})
);
if (response.Job?.Status === 'ERROR') {
console.error(
`Job ${response.Job.Id} failed with error ${response.Job.ErrorMessage}, Error code: ${response.Job.ErrorCode}`
);
}
} catch (error) {
logger.error(
`Error transcoding ${inputFilename} to ${outputURI}: \n Error: ${error}`
Expand Down

0 comments on commit 883f2ba

Please sign in to comment.