Skip to content

fix: explain and stop retrying when an API key's access doesn't cover… - #326

Merged
finalerock44 merged 1 commit into
devfrom
feat/ci-api-key-scope-2106
Nov 17, 2026
Merged

finalerock44 merged 1 commit into
devfrom
feat/ci-api-key-scope-2106

Conversation

@finalerock44

Copy link
Copy Markdown
Contributor

… a call

An API key's access can be limited when it is created, for example to starting test runs and reading only the runs it started. The API answers a call outside that access with 403 API_KEY_SCOPE, and a run the key didn't start with 404 UPLOAD_NOT_FOUND.

  • ApiError keeps the API's error code. A scope 403 now says what the key is limited to and where access is chosen, instead of the advice for a revoked or wrong key.
  • The dcd cloud poll loop stops at once on either code instead of retrying 30 times (about 14 minutes) first.
  • dcd status treats any 4xx ApiError as final instead of retrying it 5 times and then reporting the API as unreachable.
  • Fetching compatibility data reports the API's reason instead of only "HTTP error! status: 403".

What & why

Type of change

  • fix — bug fix
  • feat — new feature
  • perf — performance improvement
  • refactor — code change that's neither a fix nor a feature
  • docs — documentation only
  • chore / ci / build / test — tooling, no user-facing change
  • Breaking change (title has ! or PR notes a BREAKING CHANGE:)

Checklist

  • PR title follows the Conventional Commits format (see comment above)
  • pnpm lint passes
  • pnpm typecheck passes
  • pnpm build passes
  • I have not bumped the version or edited CHANGELOG.md (the release workflow handles this)
  • I have signed the CLA (the bot will prompt on first contribution)
  • Docs / README.md / STYLE_GUIDE.md updated if behaviour or output changed

How to test

… a call

An API key's access can be limited when it is created, for example to
starting test runs and reading only the runs it started. The API answers a
call outside that access with 403 `API_KEY_SCOPE`, and a run the key didn't
start with 404 `UPLOAD_NOT_FOUND`.

- `ApiError` keeps the API's error code. A scope 403 now says what the key
  is limited to and where access is chosen, instead of the advice for a
  revoked or wrong key.
- The `dcd cloud` poll loop stops at once on either code instead of
  retrying 30 times (about 14 minutes) first.
- `dcd status` treats any 4xx `ApiError` as final instead of retrying it 5
  times and then reporting the API as unreachable.
- Fetching compatibility data reports the API's reason instead of only
  "HTTP error! status: 403".
@finalerock44 finalerock44 self-assigned this Nov 17, 2026
@claude

claude Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@finalerock44
finalerock44 merged commit b5d8305 into dev Nov 17, 2026
9 checks passed
@finalerock44
finalerock44 deleted the feat/ci-api-key-scope-2106 branch November 17, 2026 11:10
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.

1 participant