-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Description
I am trying to connect to a REST API with this client but I get this error when I try to list projects. What does this error mean? When I use curl it works fine.
Code:
api = API(
api_root_url='...api_url...',
params={},
headers={
'Authorization': 'Bearer [...]')
},
timeout=30,
append_slash=False,
json_encode_body=True,
)
api.add_resource(resource_name='projects')
api.projects.actions # runs ok!
api.projects.list() # Failure!
Error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/anaconda3/envs/test/lib/python3.8/site-packages/simple_rest_client/resource.py", line 101, in action_method
return make_request(self.client, request)
File "/usr/local/anaconda3/envs/test/lib/python3.8/site-packages/simple_rest_client/decorators.py", line 35, in wrapper
response = f(*args, **kwargs)
File "/usr/local/anaconda3/envs/test/lib/python3.8/site-packages/simple_rest_client/request.py", line 25, in make_request
client_response = client_method(request.url, **client_options)
File "/usr/local/anaconda3/envs/test/lib/python3.8/site-packages/httpx/_client.py", line 804, in get
return self.request(
File "/usr/local/anaconda3/envs/test/lib/python3.8/site-packages/httpx/_client.py", line 640, in request
return self.send(
File "/usr/local/anaconda3/envs/test/lib/python3.8/site-packages/httpx/_client.py", line 670, in send
response = self._send_handling_redirects(
File "/usr/local/anaconda3/envs/test/lib/python3.8/site-packages/httpx/_client.py", line 699, in _send_handling_redirects
response = self._send_handling_auth(
File "/usr/local/anaconda3/envs/test/lib/python3.8/site-packages/httpx/_client.py", line 736, in _send_handling_auth
response = self._send_single_request(request, timeout)
File "/usr/local/anaconda3/envs/test/lib/python3.8/site-packages/httpx/_client.py", line 759, in _send_single_request
(
File "/usr/local/anaconda3/envs/test/lib/python3.8/contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/anaconda3/envs/test/lib/python3.8/site-packages/httpx/_exceptions.py", line 359, in map_exceptions
raise mapped_exc(message, **kwargs) from None # type: ignore
httpx._exceptions.ProxyError: 503 Error
Metadata
Metadata
Assignees
Labels
No labels