Closed benlocum closed 2 years ago
At moment, any response with the status code which is not 200, will be considered as failed and will do a retry, And after all nodes return a failure result, a unique URLError will be raised.
If you want a response with the status code witch is not 200 and want to take it as a success response, I think I have give another configuration to do this.
At 0.10.5
in init method, you can set strict_service_error_policy
to False, by doing so, the HTTPError
will be raise when do_service raise that.
Close for the long time silence.
If you have any problem, please re-open this issue.
Works great! Thank you!
I am trying to catch "entity not found" responses. According to the examples, this code should do that:
try: res = eureka_client.do_service(app_name, service) except urllib.request.HTTPError as e: print("error code {}".format(e.code))
But instead of an HTTPError I always get a URLError. Looking at EurekaClient.walk_nodes(), it seems to always raise a URLError. How can I see the response status?