-
Notifications
You must be signed in to change notification settings - Fork 146
fix: incorrect error message on cloning unauthorized repos #1204
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
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1204 +/- ##
==========================================
+ Coverage 83.72% 83.86% +0.13%
==========================================
Files 67 67
Lines 2888 2906 +18
Branches 366 366
==========================================
+ Hits 2418 2437 +19
+ Misses 410 409 -1
Partials 60 60 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Great work figuring this out! I've dug out some more info on when requests to /info/refs occur, to inform comments and think you should make a function name more specific - but otherwise very happy to see this solved.
Co-authored-by: Kris West <kristopher.west@natwest.com> Signed-off-by: Fabio Vincenzi <93596376+fabiovincenzi@users.noreply.github.com>
Co-authored-by: Kris West <kristopher.west@natwest.com> Signed-off-by: Fabio Vincenzi <93596376+fabiovincenzi@users.noreply.github.com>
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.
I just realized the catch statement down on line 103 of src/proxy/routes/index.ts should probably do the same check and use the response format - that handles uncaught errors thrown while running the chain. Not critical but more complete?
You are right! @kriswest |
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.
One thing to simplify, otherwise LGTM!
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.
Tested the original flow and works fine, LGTM after fixing up Kris' comments! 🚀
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.
Happy with this.
Fixes #1181 by implementing proper Git protocol error handling for
GET /info/refs requests
, replacing confusing error messages when cloning unauthorized repositories.The issue was a Git protocol mismatch in error handling: