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/08/04 13:48:31 UTC

[GitHub] [trafficcontrol] dmohan001c commented on a change in pull request #6003: Fix Internal server error in Get Profiles by invalid Params

dmohan001c commented on a change in pull request #6003:
URL: https://github.com/apache/trafficcontrol/pull/6003#discussion_r682633505



##########
File path: traffic_ops/traffic_ops_golang/profile/profiles.go
##########
@@ -149,7 +149,7 @@ func (prof *TOProfile) Read(h http.Header, useIMS bool) ([]interface{}, error, e
 
 	rows, err := prof.ReqInfo.Tx.NamedQuery(query, queryValues)
 	if err != nil {
-		return nil, nil, errors.New("profile read querying: " + err.Error()), http.StatusInternalServerError, nil
+		return nil, err, errors.New("profile read querying: " + err.Error()), http.StatusBadRequest, nil

Review comment:
       added another validation for the param and cdn to make sure it's an integer.




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

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