instagram_connect 0.3.12 → 0.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/app/jobs/instagram_connect/account_readiness_job.rb +16 -0
- data/lib/instagram_connect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: acad3028e8aecad50414e6bd980d896ca1b5c8245b28d517889b1cbfd5cca8ce
|
|
4
|
+
data.tar.gz: d7be5c7d2b2da1ba842cf1558a38de3d820557f4b982892c047c10d76b5b0744
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 00e7e104a3ac1cc0cfcca780868f4c046ff4d593ce37606862f6d81b20971dfc66edcbd070018a1775e60ae2143393f9ce42b00ecffb835504cd093579e04964
|
|
7
|
+
data.tar.gz: 95e0f2ee5b9462277e0f87156288a31314a7b73888a0a38aa411340f25f98a4c646e04d45989c638dc6f0664982bf9f11d85aed3e3ebaefbb151a3e4f143ed8e
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@ All notable changes to this project are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.3.13] - 2026-07-28
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **The readiness pass was the one path still shipping an unreadable token to Meta.** It builds its
|
|
14
|
+
own `Authorization` header rather than going through `Account#client`, so 0.3.12's guard never
|
|
15
|
+
covered it: Meta answered "Cannot parse access token" and the failure was recorded as if the
|
|
16
|
+
SUBSCRIPTION were broken. It now skips such an account with the real reason on `readiness_error`,
|
|
17
|
+
and the header builder itself refuses, so any future caller in that job is covered too.
|
|
18
|
+
|
|
19
|
+
|
|
9
20
|
## [0.3.12] - 2026-07-27
|
|
10
21
|
|
|
11
22
|
### Fixed
|
|
@@ -64,6 +64,18 @@ module InstagramConnect
|
|
|
64
64
|
# completing without raising.
|
|
65
65
|
account.update_columns(readiness_error: nil) if account.readiness_error.present?
|
|
66
66
|
|
|
67
|
+
# This job builds its own Authorization header rather than going
|
|
68
|
+
# through Account#client, so the guard there does not cover it — and
|
|
69
|
+
# an unreadable token would be shipped to Meta as a bearer string,
|
|
70
|
+
# answered with "Cannot parse access token", and recorded as if the
|
|
71
|
+
# SUBSCRIPTION were the problem. Say what is actually wrong instead.
|
|
72
|
+
unless account.token_readable?
|
|
73
|
+
account.update_columns(readiness_error: Account::TOKEN_UNREADABLE_MESSAGE.truncate(255))
|
|
74
|
+
logger.error("[InstagramConnect] readiness skipped for account=#{account.id}: " \
|
|
75
|
+
"#{Account::TOKEN_UNREADABLE_MESSAGE}")
|
|
76
|
+
next
|
|
77
|
+
end
|
|
78
|
+
|
|
67
79
|
ensure_page_token(account)
|
|
68
80
|
ensure_subscription(account)
|
|
69
81
|
rescue StandardError => e
|
|
@@ -145,6 +157,10 @@ module InstagramConnect
|
|
|
145
157
|
end
|
|
146
158
|
|
|
147
159
|
def bearer(account)
|
|
160
|
+
unless account.token_readable?
|
|
161
|
+
raise InstagramConnect::TokenUnreadableError, Account::TOKEN_UNREADABLE_MESSAGE
|
|
162
|
+
end
|
|
163
|
+
|
|
148
164
|
{ "Authorization" => "Bearer #{account.api_token}" }
|
|
149
165
|
end
|
|
150
166
|
|