redpanda-data / console

Redpanda Console is a developer-friendly UI for managing your Kafka/Redpanda workloads. Console gives you a simple, interactive approach for gaining visibility into your topics, masking data, managing consumer groups, and exploring real-time data with time-travel debugging.
https://redpanda.com
3.84k stars 352 forks source link

Improve errors for topic documentation #1480

Open JakeSCahill opened 1 month ago

JakeSCahill commented 1 month ago

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"}
weeco commented 1 month ago

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.

JakeSCahill commented 2 weeks ago

I think logging the branch name would also help.