Commit c48aeabb authored by Sushil Khanchi's avatar Sushil Khanchi 🐨

Commit: return with logging if revision not found

parent 625a62c2c75a
Pipeline #13322 passed with stages
in 1 minute and 11 seconds
......@@ -239,7 +239,13 @@ class CommitServicer(CommitServiceServicer, HGitalyServicer):
logger.debug("FindCommit revision=%r", revision)
ctx = gitlab_revision_changeset(repo, revision)
commit = None if ctx is None else message.commit(ctx)
if ctx is None:
logger.warning(
"FindCommit revision %r could not be found",
revision)
return FindCommitsResponse()
commit = message.commit(ctx)
return FindCommitResponse(commit=commit)
def FindAllCommits(self, request: FindAllCommitsRequest,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment