api: maked logging of get_repo_file API function tell a bit more info about errors.

This commit is contained in:
Marcin Kuzminski 2019-02-14 21:46:24 +01:00
parent 3871bc6f15
commit 8ef8bf2673

View file

@ -581,8 +581,10 @@ def get_repo_file(request, apiuser, repoid, commit_id, file_path,
content=content, max_file_bytes=max_file_bytes, cache=cache)
except Exception:
log.exception("Exception occurred while trying to get repo node")
raise JSONRPCError('failed to get repo: `%s` nodes' % repo.repo_name)
log.exception("Exception occurred while trying to get repo %s file",
repo.repo_name)
raise JSONRPCError('failed to get repo: `{}` file at path {}'.format(
repo.repo_name, file_path))
return node