dmohan001c commented on a change in pull request #6003:
URL: https://github.com/apache/trafficcontrol/pull/6003#discussion_r666698170
##########
File path: traffic_ops/traffic_ops_golang/profile/profiles.go
##########
@@ -149,7 +150,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, errors.New("bad request found"),
errors.New("profile read querying: " + err.Error()), http.StatusBadRequest, nil
Review comment:
I tried using ParseDBError function getting the same 500 Internal error.
Instead, I updated the code to print the exact errors. It returns 400 Bad
Request.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]