mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 05:11:41 +01:00 
			
		
		
		
	When deleting a tracked time through the API return 404 not 500 (#11319)
This commit is contained in:
		
							parent
							
								
									71e73db2ff
								
							
						
					
					
						commit
						486e4c8087
					
				| @ -317,6 +317,10 @@ func DeleteTime(ctx *context.APIContext) { | |||||||
| 
 | 
 | ||||||
| 	time, err := models.GetTrackedTimeByID(ctx.ParamsInt64(":id")) | 	time, err := models.GetTrackedTimeByID(ctx.ParamsInt64(":id")) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
|  | 		if models.IsErrNotExist(err) { | ||||||
|  | 			ctx.NotFound(err) | ||||||
|  | 			return | ||||||
|  | 		} | ||||||
| 		ctx.Error(http.StatusInternalServerError, "GetTrackedTimeByID", err) | 		ctx.Error(http.StatusInternalServerError, "GetTrackedTimeByID", err) | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user