-
Notifications
You must be signed in to change notification settings - Fork 15
improve auth error on clone #159
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
Conversation
Codecov ReportBase: 81.66% // Head: 81.63% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #159 +/- ##
==========================================
- Coverage 81.66% 81.63% -0.04%
==========================================
Files 25 25
Lines 3404 3408 +4
Branches 588 588
==========================================
+ Hits 2780 2782 +2
- Misses 542 544 +2
Partials 82 82
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
fb1c2f7 to
28cd42b
Compare
|
Minor: Can we also include the exception name ( Less minor: Why is this specific to |
I think the If you think the dulwich exception is clearer, we could also just stop catching |
|
Thanks @dtrifiro!
I think it's clearer to show More importantly, I'd rather do this for other exceptions so that any other clone failures can be more easily debugged. I know it's maybe duplicating the point of For example, instead of: It would be more helpful to immediately see: One more minor thing - the |
|
How about something like this:
|
The error message looks good, thanks!
What do you think about this? |
|
dvc is responsible for error messages, not the scmrepo. Exception should hold enough information to generate in dvc. |
| except HTTPUnauthorized as exc: | ||
| raise AuthError(url) from exc |
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.
For the clone, since we already have CloneError, it might be better to reuse that and only change the exception message.
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.
Yep, that's what I was thinking
|
Pull request was converted to draft
bb5b003 to
2a591fe
Compare
906655e to
9752d45
Compare
9752d45 to
c375ec6
Compare
fixes treeverse/dvc#8654