From 329ba8489614d0f338886d230d624ec8be8f0406 Mon Sep 17 00:00:00 2001 From: Gilad Resisi Date: Tue, 18 Aug 2026 08:24:28 +0700 Subject: [PATCH] fix(facebook): map page-permission (code 190) errors to a curated message Facebook rejects page publishes with OAuthException code 190 and the message "...permission(s) must be granted before impersonating a user's page" when the connected user lacks the required page-level permissions. Unlike the token-validation 190 variants this is not fixed by reconnecting, so it is mapped as a non-retryable bad-body with an actionable message instead of falling through to the 'Unknown Error' placeholder. Co-Authored-By: Claude Fable 5 --- .../src/integrations/social/facebook.provider.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts b/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts index 5ade76092b..aa06c8f990 100644 --- a/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts +++ b/libraries/nestjs-libraries/src/integrations/social/facebook.provider.ts @@ -81,6 +81,14 @@ export class FacebookProvider extends SocialAbstract implements SocialProvider { }; } + if (body.indexOf("before impersonating a user's page") > -1) { + return { + type: 'bad-body' as const, + value: + 'Facebook rejected the post because your account is missing permissions on this Page. Make sure your Facebook account has full content access to the Page, then reconnect the channel.', + }; + } + if (body.indexOf('1366046') > -1) { return { type: 'bad-body' as const,