We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 722b4a1 commit dd67ec8Copy full SHA for dd67ec8
1 file changed
rootfs/api/views.py
@@ -867,7 +867,10 @@ def get_client(self):
867
def list(self, request, **kwargs):
868
path = request.query_params.get('path', '')
869
client = self.get_client()
870
- results = client.get(path, params={"action": "list"}).json()
+ response = client.get(path, params={"action": "list"})
871
+ if response.status_code != 200:
872
+ raise DryccException(response.text.replace("\n", ""))
873
+ results = response.json()
874
# fake out pagination for now
875
pagination = {'results': results, 'count': len(results)}
876
return Response(data=pagination)
@@ -877,6 +880,8 @@ def retrieve(self, request, **kwargs):
877
880
878
881
chunk_size = 1024 * 1024 * 2
879
882
response = client.get(path, stream=True, params={"action": "get"})
883
884
885
return FileResponse(
886
status=response.status_code,
887
headers=response.headers,
0 commit comments