Skip to content

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

feat: service unavailable

Nevo Davidb12721a86186
diff --git a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts b/libraries/nestjs-libraries/src/integrations/social/x.provider.ts
index 4a5116305..f42f8b129 100644
--- a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts
+++ b/libraries/nestjs-libraries/src/integrations/social/x.provider.ts
@@ -45,15 +45,22 @@ export class XProvider extends SocialAbstract implements SocialProvider {
override handleErrors(body: string):
| {
- type: 'refresh-token' | 'bad-body';
+ type: 'refresh-token' | 'bad-body' | 'retry';
value: string;
}
| undefined {
if (body.includes('You are not permitted to perform this action')) {
return {
type: 'bad-body',
- value: 'There is a problem posting, please edit your post and check character count and media attachments',
- }
+ value:
+ 'There is a problem posting, please edit your post and check character count and media attachments',
+ };
+ }
+ if (body.includes('Service Unavailable')) {
+ return {
+ type: 'retry',
+ value: 'X is currently unavailable, please try again later',
+ };
}
if (body.includes('maximum of one cashtag')) {
return {