commit: Fix nil panic in LastCommitForPath
Currently in lastCommitForPath
we check if the error returned by
log.LastCommitForPath
is a NotFoundError
, but do not handle the
presence of any other error. This has been causing panics when trying
to send a nil
commit in the response, most commonly when the request
hits its deadline and is canceled.
Add a check to handle any error other than NotFoundError
.
Changelog: fixed