Skip to content
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

Improve error handling #327

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

erikbosch
Copy link
Contributor

@erikbosch erikbosch commented Sep 12, 2024

This intends to give better error handling for velocitas init and velocitas sync.

Background is that you sometimes got misleading errors, like:

  • If the repo specified in velocitas.json did not exist it as reported as "format error"
  • For some git errors "raw" simple-git expections were shown, now I try to give more context specific velocitas errors. If you want the simple-git ones you need to use verbose mode
  • I try to do some more tests after clone. Hopefully to not just silently ignore that we failed to clone due to rate limit.

Below is an example of how it could look like after this PR when trying to use a non-existing repo

image

I did some updates to testing to make things running, but in general the mocking is quite messy, especially if you want to trigger specific error situations.

@erikbosch erikbosch marked this pull request as draft September 12, 2024 13:36
@erikbosch erikbosch force-pushed the erik_co branch 22 times, most recently from 95a3fe4 to b65295d Compare September 12, 2024 19:16
@erikbosch erikbosch marked this pull request as ready for review September 12, 2024 19:23
@erikbosch
Copy link
Contributor Author

FYI @mikehaller - this one may give better errors if clone fails due to rate limiting.

This intends to give better error handling for velocitas init and velocitas sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant