console
console copied to clipboard
Improve errors for topic documentation
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"}
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.
I think logging the branch name would also help.