Skip to content

fix(github): Swallow error when getting back an error response for codeowners file#110233

Merged
Christinarlong merged 1 commit intomasterfrom
crl/swallow-404-errors-from-codeowners
Mar 10, 2026
Merged

fix(github): Swallow error when getting back an error response for codeowners file#110233
Christinarlong merged 1 commit intomasterfrom
crl/swallow-404-errors-from-codeowners

Conversation

@Christinarlong
Copy link
Contributor

Currently we don't differentiate between a JSON response and the raw bytes response when getting back a codeowner file leading to bad state issues. This PR will raise an error if we get an error response (status code >= 400) from github.

The callers of get_file will then swallow this exception so this error will not get propagated up but that's ok imo since we just want to prevent the bad state case.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 9, 2026
@Christinarlong Christinarlong marked this pull request as ready for review March 9, 2026 20:13
@Christinarlong Christinarlong requested a review from a team as a code owner March 9, 2026 20:13
@Christinarlong Christinarlong requested review from a team and souredoutlook March 9, 2026 20:13
Copy link
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 lgtm

@Christinarlong Christinarlong merged commit 9508661 into master Mar 10, 2026
59 checks passed
@Christinarlong Christinarlong deleted the crl/swallow-404-errors-from-codeowners branch March 10, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants