From 8a57ca41bf6220acea6e265ce8f487cec5db74b8 Mon Sep 17 00:00:00 2001 From: Katos <7927609+katosdev@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:26:39 +0100 Subject: [PATCH] Update error handling Code review suggestion Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- backend/app/api/handlers/v1/v1_ctrl_locations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/api/handlers/v1/v1_ctrl_locations.go b/backend/app/api/handlers/v1/v1_ctrl_locations.go index a3397561..632e9d36 100644 --- a/backend/app/api/handlers/v1/v1_ctrl_locations.go +++ b/backend/app/api/handlers/v1/v1_ctrl_locations.go @@ -104,7 +104,7 @@ func (ctrl *V1Controller) GetLocationWithPrice(auth context.Context, GID uuid.UU for _, childLocation := range location.Children { var childLocation, err = ctrl.GetLocationWithPrice(auth, GID, childLocation.ID) if err != nil { - fmt.Println(err) + return repo.LocationOut{}, err } location.TotalPrice += childLocation.TotalPrice }