-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better error msgs #18
base: main
Are you sure you want to change the base?
Conversation
last := (last_date, Result.get_ok last_hash) | ||
Store.digest store Mirage_kv.Key.empty >>= function | ||
| Error (`Not_found _) -> | ||
let msg = Fmt.str "No commit found - are you on the correct branch?" in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's indeed a good way (we probably should print out which branch we want to clone).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which branch are you thinking about? My thinking was that the user knows what branch is passed, and multiple possible branches can be present - so I wouldn't know what branch to suggest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the remote used by git-kv you can optionally specify a branch. It seems git-kv doesn't have a function to get the branch used - it may not be obvious what the default branch is, and I believe it changed from master
to main
a few months back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, on Debian, the default branch still is master
and we currently occur several cases where people don't really understand this kind of failure. I will try to provide an accessor on git-kv
to get the branch used.
Thanks for your PR. I agree that the branch that was cloned could be part of the "better error msgs". But I've an issue with a failwith that may happen at any point in time (whenever the update-hook is invoked) -- leading to the unikernel exiting. Could we instead have such an exceptional failure only when at startup the remote is not reachable / cloned an empty repository, please? I agree that the current behavour ( So what is the desired semantics?
Any other ideas? |
…user, but logging instead
Now Instead of handling this error differently from others, I made all internal server errors in |
No description provided.