diff --git a/sdk/service/service.go b/sdk/service/service.go index 6fb5e6ac3..2d5e9878a 100644 --- a/sdk/service/service.go +++ b/sdk/service/service.go @@ -78,6 +78,10 @@ func (s *Service) Create(srv *service.Service) (*service.Service, error) { srv.Sid = "_" + srv.Hash.String() } + if err := service.ValidateService(srv); err != nil { + return nil, err + } + return srv, s.serviceDB.Save(srv) }