yadayada / acd_cli

An unmaintained command line interface and FUSE filesystem for Amazon (Cloud) Drive
Other
1.35k stars 166 forks source link

500 error message spew #424

Open gebn opened 8 years ago

gebn commented 8 years ago

When Amazon returns a 500 error, a load of garbage is printed to the command line:

16-09-21 22:28:35.167 [WARNING] [acd_cli] - Timeout while uploading "img.jpg".
16-09-21 22:38:06.868 [ERROR] [acdcli.api.backoff_req] - Error getting node list.
16-09-21 22:38:07.263 [ERROR] [acd_cli] - Traceback (most recent call last):1m
  File "/.../bin/acd_cli.py", line 491, in upload_file
  duplication=dedup)
  File "/.../lib/python3.5/site-packages/acdcli/api/content.py", line 140, in upload_file
                                         raise RequestError(r.status_code, r.text)
acdcli.api.common.RequestError: RequestError: 504, [acd_api] no body received.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/.../bin/acd_cli.py", line 246, in wrapped
  t_val = f(*args, **kwargs)
  File "/.../bin/acd_cli.py", line 505, in upload_file
  turn upload_timeout(parent_id, path, hasher.get_result(), local_size, rsf)
  File "/.../bin/acd_cli.py", line 315, in upload_timeout
  = acd_client.list_children(parent_id)
  File "/.../lib/python3.5/site-packages/acdcli/api/metadata.py", line 179, in list_children
                                         l = self.BOReq.paginated_get(self.metad  a_url + 'nodes/' + node_id + '/children')
  File "/.../lib/python3.5/site-packages/acdcli/api/backoff_req.py", line 149, in paginated_get
                                         raise RequestError(r.status_code, r.text)
acdcli.api.common.RequestError: RequestError: 500, {"logref":"aef7ac58-8043-11e6-8e1c-db10c177937a","message":"Internal Server Error"}

Can this failure be handled more gracefully, similar to uploads timing out?

Python 3.5.2 acd_cli 0.3.2

bgemmill commented 8 years ago

@gebn have a look at PR #374, I needed to implement retry handling for the use mount in order to make borg backup work.