From 2278fc8f47eadf4a53452334bdd0dfbe3183a6b0 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Wed, 1 Feb 2023 13:02:22 +0100 Subject: [PATCH] Print original error when IAM load is failed in some places (#16511) --- cmd/iam.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/iam.go b/cmd/iam.go index 6ea81fca7..0f7ce5699 100644 --- a/cmd/iam.go +++ b/cmd/iam.go @@ -294,7 +294,7 @@ func (sys *IAMSys) Init(ctx context.Context, objAPI ObjectLayer, etcdClient *etc logger.Info("Waiting for all MinIO IAM sub-system to be initialized.. possible cause (%v)", err) continue } - logger.LogIf(ctx, errors.New("IAM sub-system is partially initialized, unable to write the IAM format")) + logger.LogIf(ctx, fmt.Errorf("IAM sub-system is partially initialized, unable to write the IAM format: %w", err)) return } @@ -310,7 +310,7 @@ func (sys *IAMSys) Init(ctx context.Context, objAPI ObjectLayer, etcdClient *etc continue } if err != nil { - logger.LogIf(ctx, fmt.Errorf("Unable to initialize IAM sub-system, some users may not be available %w", err)) + logger.LogIf(ctx, fmt.Errorf("Unable to initialize IAM sub-system, some users may not be available: %w", err)) } } break