console icon indicating copy to clipboard operation
console copied to clipboard

Improve errors for topic documentation

Open JakeSCahill opened this issue 1 year ago • 2 comments

I had topic documentation configured to use a specific branch that later got deleted. The error I got from Console suggested that my repo was invalid but it was the branch. Could we improve the error to report whether the repo doesn't exist or the branch or the specified path?

2024-10-18 14:33:01 {"level":"info","ts":"2024-10-18T13:33:01.206Z","msg":"cloning git repository","repository_url":"https://github.com/redpanda-data/docs","url":"https://github.com/redpanda-data/docs"}
2024-10-18 14:33:05 {"level":"fatal","ts":"2024-10-18T13:33:05.978Z","msg":"failed to start console service","error":"failed to start git service: failed to clone git repo: reference not found"}

JakeSCahill avatar Oct 18 '24 13:10 JakeSCahill

The error indicates "reference not found". A reference may be a branch, tag or commit sha. The error itself is emitted by the git library we're using. We could catch this case and reword to "branch not found" since we currently only support branches.

weeco avatar Oct 18 '24 14:10 weeco

I think logging the branch name would also help.

JakeSCahill avatar Nov 09 '24 07:11 JakeSCahill