You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/03/22 17:01:49 UTC

[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5647: Don't return a 403 Forbidden when the user tries to get servers of a non-existent DS

zrhoffman commented on a change in pull request #5647:
URL: https://github.com/apache/trafficcontrol/pull/5647#discussion_r598908119



##########
File path: traffic_ops/traffic_ops_golang/tenant/tenancy.go
##########
@@ -87,10 +87,8 @@ func CheckID(tx *sql.Tx, user *auth.CurrentUser, dsID int) (error, error, int) {
 	if err != nil {
 		return nil, errors.New("checking tenant: " + err.Error()), http.StatusInternalServerError
 	}
-	if !ok {
-		return errors.New("delivery service " + strconv.Itoa(dsID) + " not found"), nil, http.StatusNotFound
-	}
-	if dsTenantID == nil {
+	if !ok || dsTenantID == nil {
+		log.Errorf("delivery service %s not found", strconv.Itoa(dsID))

Review comment:
       This should be info-level or warning-level since this is not an internal server error.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org