Repository navigation
fix: explain and stop retrying when an API key's access doesn't cover… - #326
Merged
Merged
Conversation
… 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".
Contributor
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… 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 404UPLOAD_NOT_FOUND.ApiErrorkeeps 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.dcd cloudpoll loop stops at once on either code instead of retrying 30 times (about 14 minutes) first.dcd statustreats any 4xxApiErroras final instead of retrying it 5 times and then reporting the API as unreachable.What & why
Type of change
fix— bug fixfeat— new featureperf— performance improvementrefactor— code change that's neither a fix nor a featuredocs— documentation onlychore/ci/build/test— tooling, no user-facing change!or PR notes aBREAKING CHANGE:)Checklist
pnpm lintpassespnpm typecheckpassespnpm buildpassesCHANGELOG.md(the release workflow handles this)README.md/STYLE_GUIDE.mdupdated if behaviour or output changedHow to test