π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
fix(facebook): match error subcodes on a word boundary
Gilad Resisi8b5999b8d1c4
diff --git a/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts b/libraries/nestjs-libraries/src/integrations/social/facebook.provider.tsindex fa911f328..33c69599b 100644--- a/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts+++ b/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts@@ -229,14 +229,14 @@ export class FacebookProvider extends SocialAbstract implements SocialProvider {value: 'Facebook return: No permission to publish the video',};}- if (body.indexOf('"error_subcode":459') > -1) {+ if (/"error_subcode":459\b/.test(body)) {return {type: 'bad-body' as const,value:'Facebook is asking you to resolve a security check. Log in at facebook.com, complete it, then try again',};}- if (body.indexOf('"error_subcode":492') > -1) {+ if (/"error_subcode":492\b/.test(body)) {return {type: 'bad-body' as const,value:@@ -251,7 +251,7 @@ export class FacebookProvider extends SocialAbstract implements SocialProvider {};}if (- body.indexOf('"error_subcode":33') > -1 &&+ /"error_subcode":33\b/.test(body) &&body.indexOf('does not exist') > -1) {return {