poli-page 0.15.0 → 0.17.0
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 +19 -0
- data/README.md +3 -1
- data/lib/poli_page/errors.rb +2 -0
- data/lib/poli_page/version.rb +1 -1
- data/sig/poli_page/errors.rbs +2 -0
- 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: f32f429b7f3b0109756accc6d250b2e87d516f6deab1c7bd22a5159c631c4ad3
|
|
4
|
+
data.tar.gz: 11ba47204013ae53053dd4d80ed47cf75ddf6c4d641ced20129676ebca383ad5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 71b45810af4eb1560df732f0c4fef6c1d726101cc97ad60298838808ab3641a048cb8b09437e5d626769f1b65a55678edde634b8d4692e5dbd64167dc6c2c58d
|
|
7
|
+
data.tar.gz: a0abb12da20f23f17b7d75d288b33c0f3d27b01cc59bdcac7969f3602784c4b2e77241f017043bea6199d1abaa8007b20bf1675897f06ddb64c1d5baef51227a
|
data/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,25 @@ Breaking releases (minor bumps while on 0.x) are summarized in
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.17.0] - 2026-12-01
|
|
14
|
+
|
|
15
|
+
Conformance with the Poli Page API contract v0.17.0
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- `PoliPage::ErrorCodes::API_KEY_EXPIRED` (401): the key's expiry has passed.
|
|
20
|
+
Create a new key in the dashboard and update `POLI_PAGE_API_KEY`. Raised as
|
|
21
|
+
`AuthenticationError`, never retried.
|
|
22
|
+
- `PoliPage::ErrorCodes::PROJECT_OUT_OF_SCOPE` (403): the key is restricted to
|
|
23
|
+
other projects than the one rendered. Raised as `PermissionDeniedError`,
|
|
24
|
+
never retried. Distinct from the playground's `400 PROJECT_NOT_ALLOWED`.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- CI pins the API contract `v0.17.0`. `INVALID_API_KEY` also covers a revoked
|
|
29
|
+
key, a deleted environment and a disabled or deleted service account, and a
|
|
30
|
+
document outside a restricted key's projects answers `404 DOCUMENT_NOT_FOUND`.
|
|
31
|
+
|
|
13
32
|
## [0.15.0] - 2026-11-17
|
|
14
33
|
|
|
15
34
|
Conformance with the Poli Page API contract v0.15.0
|
data/README.md
CHANGED
|
@@ -295,7 +295,9 @@ rescue PoliPage::Error => e
|
|
|
295
295
|
when "ORGANIZATION_PAYMENT_GRACE" then show_banner("Subscription has unpaid invoices.")
|
|
296
296
|
when "ORGANIZATION_CANCELLED" then show_banner("Subscription cancelled — service is read-only.")
|
|
297
297
|
when "ORGANIZATION_PURGED" then show_banner("Organization has been purged.")
|
|
298
|
-
when "
|
|
298
|
+
when "API_KEY_EXPIRED" then alert_ops("Key expired: create a new key in the dashboard and update POLI_PAGE_API_KEY.")
|
|
299
|
+
when "PROJECT_OUT_OF_SCOPE" then alert_ops("The key is restricted to other projects: use a key that includes this project.")
|
|
300
|
+
when "DOCUMENT_NOT_FOUND" then render_404 # also a stored document outside a restricted key's projects
|
|
299
301
|
when "DOCUMENT_GONE" then render_410 # deleted, or a sandbox document past 30 days
|
|
300
302
|
else
|
|
301
303
|
raise
|
data/lib/poli_page/errors.rb
CHANGED
|
@@ -211,9 +211,11 @@ module PoliPage
|
|
|
211
211
|
module ErrorCodes
|
|
212
212
|
MISSING_API_KEY = "MISSING_API_KEY" # 401
|
|
213
213
|
INVALID_API_KEY = "INVALID_API_KEY" # 401
|
|
214
|
+
API_KEY_EXPIRED = "API_KEY_EXPIRED" # 401
|
|
214
215
|
ORGANIZATION_PAYMENT_GRACE = "ORGANIZATION_PAYMENT_GRACE" # 403
|
|
215
216
|
ORGANIZATION_CANCELLED = "ORGANIZATION_CANCELLED" # 403
|
|
216
217
|
FORBIDDEN = "FORBIDDEN" # 403
|
|
218
|
+
PROJECT_OUT_OF_SCOPE = "PROJECT_OUT_OF_SCOPE" # 403
|
|
217
219
|
ENVIRONMENT_PROTECTED = "ENVIRONMENT_PROTECTED" # 403
|
|
218
220
|
THUMBNAILS_NOT_AVAILABLE = "THUMBNAILS_NOT_AVAILABLE" # 403
|
|
219
221
|
VALIDATION_ERROR = "VALIDATION_ERROR" # 400
|
data/lib/poli_page/version.rb
CHANGED
data/sig/poli_page/errors.rbs
CHANGED
|
@@ -72,9 +72,11 @@ module PoliPage
|
|
|
72
72
|
module ErrorCodes
|
|
73
73
|
MISSING_API_KEY: String
|
|
74
74
|
INVALID_API_KEY: String
|
|
75
|
+
API_KEY_EXPIRED: String
|
|
75
76
|
ORGANIZATION_PAYMENT_GRACE: String
|
|
76
77
|
ORGANIZATION_CANCELLED: String
|
|
77
78
|
FORBIDDEN: String
|
|
79
|
+
PROJECT_OUT_OF_SCOPE: String
|
|
78
80
|
ENVIRONMENT_PROTECTED: String
|
|
79
81
|
THUMBNAILS_NOT_AVAILABLE: String
|
|
80
82
|
VALIDATION_ERROR: String
|