Skip to content

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

feat: x error message longer than 2 minutes

Nevo Davida3047d1855fa
diff --git a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts b/libraries/nestjs-libraries/src/integrations/social/x.provider.ts
index ca32f23ca..14bff67a4 100644
--- a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts
+++ b/libraries/nestjs-libraries/src/integrations/social/x.provider.ts
@@ -38,8 +38,7 @@ export class XProvider extends SocialAbstract implements SocialProvider {
if (body.includes('usage-capped')) {
return {
type: 'refresh-token',
- value:
- 'Posting failed - capped reached. Please try again later',
+ value: 'Posting failed - capped reached. Please try again later',
};
}
if (body.includes('duplicate-rules')) {
@@ -55,6 +54,17 @@ export class XProvider extends SocialAbstract implements SocialProvider {
value: 'The Tweet contains a URL that is not allowed on X',
};
}
+ if (
+ body.includes(
+ 'This user is not allowed to post a video longer than 2 minutes'
+ )
+ ) {
+ return {
+ type: 'bad-body',
+ value:
+ 'The video you are trying to post is longer than 2 minutes, which is not allowed for this account',
+ };
+ }
return undefined;
}