mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Handle missing README in create repos API (#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`.
This commit is contained in:
		@@ -713,6 +713,9 @@
 | 
			
		||||
          "201": {
 | 
			
		||||
            "$ref": "#/responses/Repository"
 | 
			
		||||
          },
 | 
			
		||||
          "400": {
 | 
			
		||||
            "$ref": "#/responses/error"
 | 
			
		||||
          },
 | 
			
		||||
          "403": {
 | 
			
		||||
            "$ref": "#/responses/forbidden"
 | 
			
		||||
          },
 | 
			
		||||
@@ -1926,6 +1929,9 @@
 | 
			
		||||
          "201": {
 | 
			
		||||
            "$ref": "#/responses/Repository"
 | 
			
		||||
          },
 | 
			
		||||
          "400": {
 | 
			
		||||
            "$ref": "#/responses/error"
 | 
			
		||||
          },
 | 
			
		||||
          "403": {
 | 
			
		||||
            "$ref": "#/responses/forbidden"
 | 
			
		||||
          },
 | 
			
		||||
@@ -13382,6 +13388,9 @@
 | 
			
		||||
          "201": {
 | 
			
		||||
            "$ref": "#/responses/Repository"
 | 
			
		||||
          },
 | 
			
		||||
          "400": {
 | 
			
		||||
            "$ref": "#/responses/error"
 | 
			
		||||
          },
 | 
			
		||||
          "409": {
 | 
			
		||||
            "description": "The repository with the same name already exists."
 | 
			
		||||
          },
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user