Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

fix(instagram): curate container processing errors, map 2207082 to the silent-video audio hint

Gilad Resisif4bd43f27665
diff --git a/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts b/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts
index 8800a5ce9..1aae0e7a8 100644
--- a/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts
+++ b/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts
@@ -206,6 +206,14 @@ export class InstagramProvider
};
}
+ if (body.indexOf('2207082') > -1) {
+ return {
+ type: 'bad-body' as const,
+ value:
+ 'Instagram could not process this video. If you attached audio to a video that has no sound track, set the original video volume to 0 and try again',
+ };
+ }
+
if (body.indexOf('2207023') > -1) {
return {
type: 'bad-body' as const,
@@ -643,11 +651,12 @@ export class InstagramProvider
).json();
if (status_code === 'ERROR' || status_code === 'EXPIRED') {
+ const handleError = this.handleErrors(status || '', 200);
throw new BadBody(
this.identifier,
JSON.stringify({ status_code, status }),
'{}',
- status || 'Instagram could not process the media'
+ handleError?.value || status || 'Instagram could not process the media'
);
}