mhoppa commented on a change in pull request #3988: Remove Traffic Ops Golang 
legacy tc.ApiErrorType
URL: https://github.com/apache/trafficcontrol/pull/3988#discussion_r335158978
 
 

 ##########
 File path: traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices.go
 ##########
 @@ -821,14 +821,19 @@ func readGetDeliveryServices(params map[string]string, 
tx *sqlx.Tx, user *auth.C
 
        where, orderBy, pagination, queryValues, errs := 
dbhelpers.BuildWhereAndOrderByAndPagination(params, queryParamsToSQLCols)
        if len(errs) > 0 {
-               return nil, errs, tc.DataConflictError
+               for _, err := range errs {
+                       if err.Error() == `id cannot parse to integer` { // 
TODO create const for string
 
 Review comment:
   why the addition here?  Also why does an id not being able to be parsed to 
an int mean not found?
   
   FWIW In our generic read, that is used across many handlers, we just join 
the errors and mark it is a bad request. Should we follow that here?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to