We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a41fc1 commit 365eae1Copy full SHA for 365eae1
1 file changed
caddy/app.go
@@ -62,7 +62,12 @@ func (f *FrankenPHPApp) Provision(ctx caddy.Context) error {
62
}
63
} else {
64
// if the http module is not configured (this should never happen) then collect the metrics by default
65
- f.metrics = frankenphp.NewPrometheusMetrics(ctx.GetMetricsRegistry())
+ if errors.Is(err, caddy.ErrNotConfigured) {
66
+ f.metrics = frankenphp.NewPrometheusMetrics(ctx.GetMetricsRegistry())
67
+ } else {
68
+ // the http module failed to provision due to invalid configuration
69
+ return fmt.Errorf("failed to provision caddy http: %w", err)
70
+ }
71
72
73
return nil
0 commit comments