Skip to content

feat: PermissionDeniedError for 403 insufficient_scope (0.52.0) - #47

Merged
0xGhostCasper merged 1 commit into
mainfrom
permission-denied-error
Oct 5, 2026
Merged

0xGhostCasper merged 1 commit into
mainfrom
permission-denied-error

Conversation

@0xGhostCasper

Copy link
Copy Markdown
Member

Adds PermissionDeniedError for the new 403 insufficient_scope response (API keys can now be restricted to specific APIs; a call outside them is refused before any charge). Carries the required and allowed scopes. Backward compatible: it subclasses the error a 403 raised before.

Companion to scrape-badger/scrapebadger#2275.

🤖 Generated with Claude Code

API keys can now be restricted to specific APIs; a call outside them
answers 403 error=insufficient_scope with required_scope/allowed_scopes.
Extends AuthenticationError, which a 403 threw before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@0xGhostCasper
0xGhostCasper merged commit f7c19c5 into main Oct 5, 2026
4 checks passed
@0xGhostCasper
0xGhostCasper deleted the permission-denied-error branch October 5, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants