rob05c commented on a change in pull request #2952: Change Traffic Ops to 501 
Not Implemented on unknown version reqs, and client to return a helpful message
URL: https://github.com/apache/trafficcontrol/pull/2952#discussion_r227523969
 
 

 ##########
 File path: traffic_ops/client/session.go
 ##########
 @@ -254,6 +254,11 @@ func (to *Session) ErrUnlessOK(resp *http.Response, 
remoteAddr net.Addr, err err
        }
 
        defer resp.Body.Close()
+
+       if resp.StatusCode == http.StatusNotImplemented {
+               return nil, remoteAddr, errors.New("Traffic Ops Server returned 
'Not Implemented', this client is probably older than Traffic Ops, and you 
probably need to either upgrade Traffic Ops, or use a client whose version 
matches your Traffic Ops version.")
 
 Review comment:
   Fixed

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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