chore: commit pending gateway changes
This commit is contained in:
@@ -2,6 +2,7 @@ package httpapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
@@ -74,6 +75,10 @@ func (s *Server) deletePricingRuleSet(w http.ResponseWriter, r *http.Request) {
|
||||
writeError(w, http.StatusNotFound, "pricing rule set not found")
|
||||
return
|
||||
}
|
||||
if errors.Is(err, store.ErrProtectedDefault) {
|
||||
writeError(w, http.StatusForbidden, "default pricing rule set cannot be deleted")
|
||||
return
|
||||
}
|
||||
s.logger.Error("delete pricing rule set failed", "error", err)
|
||||
writeError(w, http.StatusInternalServerError, "delete pricing rule set failed")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user