8000 Fix get / delete runner to use consistent http 404 and 500 status by ChristopherHX · Pull Request #34480 · go-gitea/gitea · GitHub
[go: up one dir, main page]

Skip to content

Fix get / delete runner to use consistent http 404 and 500 status #34480

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

Merged

Conversation

ChristopherHX
Copy link
Contributor
  • previously deleting an already deleted runner returned http 500
  • previously any database error for the get endpoint was http 404 and never 500

* also return http 500 for GetRunner if there is a database error
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 15, 2025
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels May 15, 2025
@ChristopherHX ChristopherHX added the backport/v1.24 This PR should be backported to Gitea 1.24 label May 15, 2025
@ChristopherHX
Copy link
Contributor Author

Via cloudbase/garm#323 (comment)

nightly version of gitea returns status code 500 if I try to remove a runner that does not exist (I was expecting a 404)

CC @gabriel-samfira

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 15, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 16, 2025
@wxiaoguang wxiaoguang enabled auto-merge (squash) May 16, 2025 06:20
@wxiaoguang wxiaoguang merged commit 59df03b into go-gitea:main May 16, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.25.0 milestone May 16, 2025
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request May 16, 2025
…-gitea#34480)

* previously deleting an already deleted runner returned http 500
* previously any database error for the get endpoint was http 404 and never 500
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label May 16, 2025
techknowlogick pushed a commit that referenced this pull request May 16, 2025
…4480) (#34488)

Backport #34480 by @ChristopherHX

* previously deleting an already deleted runner returned http 500
* previously any database error for the get endpoint was http 404 and
never 500

Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/v1.24 This PR should be backported to Gitea 1.24 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0