mirror of
https://github.com/Noooste/garage-ui.git
synced 2026-08-12 06:26:56 +00:00
feat(logging): enhance logging in GarageAdminService with detailed request information
Signed-off-by: Noooste <83548733+Noooste@users.noreply.github.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
@@ -50,6 +51,15 @@ func IsConnectionRefused(err error) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Some HTTP clients (e.g. azuretls) collapse the syscall error into a
|
||||
// plain string before returning. Fall back to substring matching so the
|
||||
// retry path still triggers for those wrappers. "connectex" is the
|
||||
// Windows variant emitted by the Go runtime.
|
||||
msg := err.Error()
|
||||
if strings.Contains(msg, "connection refused") || strings.Contains(msg, "actively refused") {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user