From cdbd5e455fa826b9f367110eaab79f5ee6858f94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Thu, 14 Nov 2024 15:51:48 +0900 Subject: [PATCH] web/client: Clearer error if feeds manager fails to create --- deployment/environment/web/sdk/client/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deployment/environment/web/sdk/client/client.go b/deployment/environment/web/sdk/client/client.go index 011eb0cce31..74d18c13acb 100644 --- a/deployment/environment/web/sdk/client/client.go +++ b/deployment/environment/web/sdk/client/client.go @@ -202,6 +202,10 @@ func (c *client) CreateJobDistributor(ctx context.Context, in JobDistributorInpu feedsManager := success.GetFeedsManager() return feedsManager.GetId(), nil } + if err, ok := response.GetCreateFeedsManager().(*generated.CreateFeedsManagerCreateFeedsManagerSingleFeedsManagerError); ok { + msg := err.GetMessage() + return "", fmt.Errorf("failed to create feeds manager: %v", msg) + } return "", fmt.Errorf("failed to create feeds manager") }