From ec4889afb4e03e0c2d8c4efaacc2e5a1441f9bef Mon Sep 17 00:00:00 2001 From: Ivan Dmitriev <100341+idmitriev@users.noreply.github.com> Date: Thu, 14 Sep 2023 20:45:21 +0400 Subject: [PATCH] Fail on non ok status codes in dac fulfillemnt post --- dac/pkg/collection_point.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dac/pkg/collection_point.go b/dac/pkg/collection_point.go index 940f223..3e45007 100644 --- a/dac/pkg/collection_point.go +++ b/dac/pkg/collection_point.go @@ -70,7 +70,7 @@ func (d dacCollectionPoint) SaveFulfillment(fulfillment Fulfillment) error { return err } else if response.StatusCode != http.StatusOK { body, _ := io.ReadAll(response.Body) - return fmt.Errorf("DAC collection point post: %d %w", response.StatusCode, body) + return fmt.Errorf("DAC collection point post: %d %s", response.StatusCode, string(body)) } return nil