Skip to content

A continuation of HomeBox the inventory and organization system built for the Home User

Update error handling

Katos8a57ca41bf62
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
}