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

Handle missing README in create repos API (#23387) #23509

Merged

Conversation

Zettat123
Copy link
Contributor

Backport #23387
Close #22934

In /user/repos API (and other APIs related to creating repos), user can specify a readme template for auto init. At present, if the specified template does not exist, a 500 will be returned . This PR improved the logic and will return a 400 instead of 500.

Close go-gitea#22934

In `/user/repos` API (and other APIs related to creating repos), user
can specify a readme template for auto init. At present, if the
specified template does not exist, a `500` will be returned . This PR
improved the logic and will return a `400` instead of `500`.
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 16, 2023
@lunny lunny added this to the 1.18.6 milestone Mar 16, 2023
@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 Mar 16, 2023
@lafriks
Copy link
Member

lafriks commented Mar 16, 2023

This should have been 422 as this is validation error not bad request that would be for example for unparsable JSON or things like that

@delvh
Copy link
Member

delvh commented Mar 16, 2023

Hmm… I disagree.
For me, Bad Request is much more descriptive than Unprocessable Content in that it says the user did something wrong…

@techknowlogick techknowlogick merged commit e01e78a into go-gitea:release/v1.18 Mar 17, 2023
@Zettat123 Zettat123 deleted the backport/22387_to_1.18 branch March 27, 2023 03:48
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants