fix: incorrect error message on cloning unauthorized repos#1204
fix: incorrect error message on cloning unauthorized repos#1204kriswest merged 10 commits intofinos:mainfrom
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:
|
kriswest
left a comment
There was a problem hiding this comment.
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.
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 |
kriswest
left a comment
There was a problem hiding this comment.
One thing to simplify, otherwise LGTM!
jescalada
left a comment
There was a problem hiding this comment.
Tested the original flow and works fine, LGTM after fixing up Kris' comments! 🚀
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: