fix: improve log for invalid middleware.

This commit is contained in:
Ludovic Fernandez 2019-09-26 10:04:04 +02:00 committed by Traefiker Bot
parent ea78808e74
commit 027d313df5

View file

@ -324,7 +324,7 @@ func (b *Builder) buildConstructor(ctx context.Context, middlewareName string) (
}
if middleware == nil {
return nil, fmt.Errorf("middleware %q does not exist", middlewareName)
return nil, fmt.Errorf("invalid middleware %q configuration: invalid middleware type or middleware does not exist", middlewareName)
}
return tracing.Wrap(ctx, middleware), nil