mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-04-19 19:28:22 +00:00
Fix: Drop Publish returned wrong status code if not found
Deleting a publish that does not exist now results in a status code 404 instead of 500. Fixes: #1006
This commit is contained in:
committed by
Benj Fassbind
parent
c187b0d52c
commit
dbf1ac7867
@@ -376,7 +376,7 @@ func apiPublishDrop(c *gin.Context) {
|
||||
|
||||
published, err := collection.ByStoragePrefixDistribution(storage, prefix, distribution)
|
||||
if err != nil {
|
||||
AbortWithJSONError(c, http.StatusInternalServerError, fmt.Errorf("unable to drop: %s", err))
|
||||
AbortWithJSONError(c, http.StatusNotFound, fmt.Errorf("unable to drop: %s", err))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user