diff --git a/main.go b/main.go index d8fc48753..460e434ea 100644 --- a/main.go +++ b/main.go @@ -550,7 +550,12 @@ func (opts *Options) initUpstreams( } if opts.UpstreamMode != "" { - return config.UpstreamMode.UnmarshalText([]byte(opts.UpstreamMode)) + err = config.UpstreamMode.UnmarshalText([]byte(opts.UpstreamMode)) + if err != nil { + return fmt.Errorf("parsing upstream mode: %w", err) + } + + return nil } config.UpstreamMode = proxy.UpstreamModeLoadBalance