allow protection from invalid config values (#19460)
we have had numerous reports on some config values not having default values, causing features misbehaving and not having default values set properly. This PR tries to address all these concerns once and for all. Each new sub-system that gets added - must check for invalid keys - must have default values set - must not "return err" when being saved into a global state() instead collate as part of other subsystem errors allow other sub-systems to independently initialize.
This commit is contained in:
@@ -626,6 +626,10 @@ func NewHTTPTransportWithClientCerts(clientCert, clientKey string) *http.Transpo
|
||||
if err != nil {
|
||||
internalLogIf(ctx, fmt.Errorf("Unable to load client key and cert, please check your client certificate configuration: %w", err))
|
||||
}
|
||||
if transport == nil {
|
||||
// Client certs are not readable return default transport.
|
||||
return s.NewHTTPTransportWithTimeout(1 * time.Minute)
|
||||
}
|
||||
return transport
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user