Log non-file read errors on fileGet

This commit is contained in:
shortcutme 2019-06-06 02:27:35 +02:00
parent 8f26c0aeae
commit d596f28f46
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -271,11 +271,15 @@ class FileRequest(object):
except RequestError as err:
self.log.debug("GetFile %s %s request error: %s" % (self.connection, params["inner_path"], Debug.formatException(err)))
self.response({"error": "File read error: %s" % err})
except Exception as err:
except OSError as err:
if config.verbose:
self.log.debug("GetFile read error: %s" % Debug.formatException(err))
self.response({"error": "File read error"})
return False
except Exception as err:
self.log.error("GetFile exception: %s" % Debug.formatException(err))
self.response({"error": "File read Exception"})
return False
def actionGetFile(self, params):
return self.handleGetFile(params)