Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(github-growth): catch and raise RepoExistsError #53946

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

cathteng
Copy link
Member

@cathteng cathteng commented Aug 1, 2023

When self.handle_api_error(e) is called and e = RepoExistsError, the error is not explicitly checked for in handle_api_error and it returns a generic 500. If we raise the exception itself, we will get a 400.

This should help reduce the number of issues like https://sentry.sentry.io/issues/4311119036/?project=1

@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Merging #53946 (6ed4653) into master (3e3940d) will decrease coverage by 0.01%.
Report is 25 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #53946      +/-   ##
==========================================
- Coverage   79.54%   79.53%   -0.01%     
==========================================
  Files        4974     4974              
  Lines      210291   210395     +104     
  Branches    35817    35836      +19     
==========================================
+ Hits       167268   167341      +73     
- Misses      37872    37905      +33     
+ Partials     5151     5149       -2     
Files Changed Coverage Δ
...sentry/plugins/providers/integration_repository.py 92.80% <100.00%> (+2.47%) ⬆️

... and 22 files with indirect coverage changes

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 1, 2023
@cathteng cathteng marked this pull request as ready for review August 1, 2023 21:27
@cathteng cathteng requested a review from a team as a code owner August 1, 2023 21:27
@cathteng cathteng requested a review from a team August 1, 2023 21:27
@cathteng cathteng changed the title fix(github-growth): catch RepoExistsError fix(github-growth): catch and raise RepoExistsError Aug 1, 2023
@cathteng cathteng merged commit e658f63 into master Aug 1, 2023
@cathteng cathteng deleted the cathy/github-growth/repo-exists-error branch August 1, 2023 21:29
jan-auer added a commit that referenced this pull request Aug 2, 2023
* master: (660 commits)
  fix(starfish): Improve time spent column formatting (#53989)
  fix(starfish): Improve span table columns (#53988)
  fix(starfish): Remove unnecessary wrapper around span description (#53986)
  ref(getting-started-docs): Make project deletion onBack enabled by default (#54020)
  ref(getting-started-docs): Make project deletion onBack enabled by default (#54019)
  chore(spans): Add feature flag for span extraction (#53925)
  ref(backpressure): Bump rabbit http request timeout (#54014)
  chore(test): Update tests/js/sentry-test/charts.tsx to TypeScript (#54010)
  ref(merged-pr-comments): Add a couple of metrics to track successes (#53981)
  fix(hc): Fix split DB test failures (#53907)
  migration(crons): Backfill next check-in latest (#53984)
  ref(crons): Match environment label color to icon color in timeline row (#53977)
  Stop publishing to PyPI (#53980)
  ref(alerts): Soft deprecate projectalertruledetails delete method (#53970)
  fix(hc): Stabilize OrganizationRepositoryDeleteTest (#53668)
  ref(replays): change widgets to be rage & dead clicks (#53982)
  fix(github-growth): catch and raise RepoExistsError (#53946)
  feat(root-cause-analysis): Add feature flag (#53955)
  feat(helpful-event): Add back trace.sampled to sort (#53936)
  ref(metrics): Remove `performance.index-tag-values` option flag (#53870)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Aug 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants