From 3f0d96c24dcc60f7e60e63360aca2098d9ae7a93 Mon Sep 17 00:00:00 2001
From: Shivam Mishra
Date: Fri, 22 Sep 2023 16:41:04 +0530
Subject: [PATCH] chore: Add better error messages for Facebook unauthorized
(#7936)
---
.../dashboard/i18n/locale/en/inboxMgmt.json | 2 ++
.../settings/inbox/channels/Facebook.vue | 31 ++++++++++++++++---
app/services/instagram/message_text.rb | 1 +
3 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json
index 99ac944a8..74eff2033 100644
--- a/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json
+++ b/app/javascript/dashboard/i18n/locale/en/inboxMgmt.json
@@ -371,6 +371,8 @@
"DETAILS": {
"LOADING_FB": "Authenticating you with Facebook...",
"ERROR_FB_AUTH": "Something went wrong, Please refresh page...",
+ "ERROR_FB_UNAUTHORIZED": "You're not authorized to perform this action. ",
+ "ERROR_FB_UNAUTHORIZED_HELP": "Please ensure you have access to the Facebook page with full control. You can read more about Facebook roles here.",
"CREATING_CHANNEL": "Creating your Inbox...",
"TITLE": "Configure Inbox Details",
"DESC": ""
diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/channels/Facebook.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/channels/Facebook.vue
index 47f865e2d..6f55c3801 100644
--- a/app/javascript/dashboard/routes/dashboard/settings/inbox/channels/Facebook.vue
+++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/channels/Facebook.vue
@@ -17,9 +17,16 @@
-
+
+
{{ errorStateMessage }}
+
+
+