code: func (c *SpaceController) Update(ctx *app.UpdateSpaceContext) error {
  	currentUser, err := login.ContextIdentity(ctx)
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, goa.ErrUnauthorized(err.Error()))
  	}
  	err = validateUpdateSpace(ctx)
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, err)
  	}
  	var s *space.Space
  	err = application.Transactional(c.db, func(appl application.Application) error {
  		var err error
  		s, err = appl.Spaces().Load(ctx.Context, ctx.SpaceID)
  		if err != nil {
  			return err
  		}
  
  		if !uuid.Equal(*currentUser, s.OwnerID) {
  			log.Error(ctx, map[string]interface{}{"currentUser": *currentUser, "owner": s.OwnerID}, "Current user is not owner")
  			return goa.NewErrorClass("forbidden", 403)("User is not the space owner")
  		}
  
  		s.Version = *ctx.Payload.Data.Attributes.Version
  		if ctx.Payload.Data.Attributes.Name != nil {
  			s.Name = *ctx.Payload.Data.Attributes.Name
  		}
  		if ctx.Payload.Data.Attributes.Description != nil {
  			s.Description = *ctx.Payload.Data.Attributes.Description
  		}
  
  		s, err = appl.Spaces().Save(ctx.Context, s)
  		return err
  
  	})
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, err)
  	}
  	spaceData, err := ConvertSpaceFromModel(ctx.Request, *s, IncludeBacklogTotalCount(ctx.Context, c.db))
  	if err != nil {
  		return err
  	}
  	response := app.SpaceSingle{
  		Data: spaceData,
  	}
  	return ctx.OK(&response)
  }
docs: // Update runs the update action.