ocket8888 opened a new issue #4420: Traffic Ops Python client throws errors for successful responses URL: https://github.com/apache/trafficcontrol/issues/4420 ## I'm submitting a ... - bug report ## Traffic Control components affected ... - Traffic Control Client (Python) ## Current behavior: The Python client considers any response that isn't a 200 or 204 to be an error and raises an exception when it's encountered, e.g. `201 Created` responses cause it to raise exceptions. ## Expected / new behavior: The Python client should faithfully implement the HTTP standard and consider anything in the range [200,300) a success. Ideally, IMO, exceptions would only be raised from stuff like `login`, and the endpoints themselves would just return tuples containing the response code, thus leaving the caller to decide what defines "success" and "failure". For instance, redirect and informational responses aren't failures, but they're not really successes either. ## Minimal reproduction of the problem with instructions: 1. Write an endpoint/plugin that returns a successful response code other than 200 or 204 1. Call it with the Python client 1. Notice the stack trace
---------------------------------------------------------------- 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
