| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #2977 +/- ##
==========================================
- Coverage 93.17% 93.17% -0.01%
==========================================
Files 43 43
Lines 4501 4499 -2
==========================================
- Hits 4194 4192 -2
Misses 189 189
Partials 118 118 ☔ View full report in Codecov by Sentry.
|
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
Thanks |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #2976
This fixes a panic when a proxy balancer returns no target.
Built-in balancers can return nil when the target list is empty, for example after RemoveTarget removes the last target. ProxyWithConfig now returns 502 Bad Gateway through the configured error handler instead of passing the nil target to proxyHTTP or proxyRaw.
I also added a test for a custom balancer returning a target with a nil URL.
Tests pass with go test ./... -count=1.