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 fd49bae
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pipelines/aws/aws-pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,19 @@ 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}`
);
console.error(`Error code: ${response.Job.ErrorCode}`);
}
} catch (error) {
logger.error(
`Error transcoding ${inputFilename} to ${outputURI}: \n Error: ${error}`
Expand Down

0 comments on commit fd49bae

Please sign in to comment.