move generic secret errors to shared, fix edgecase in cli flags

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2022-04-29 11:15:13 +02:00
parent d86a86a884
commit 72688b3650
12 changed files with 53 additions and 25 deletions
@@ -2,11 +2,11 @@ package parser
import (
"errors"
"fmt"
"github.com/owncloud/ocis/extensions/thumbnails/pkg/config"
"github.com/owncloud/ocis/extensions/thumbnails/pkg/config/defaults"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/shared"
"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
)
@@ -36,7 +36,7 @@ func ParseConfig(cfg *config.Config) error {
func Validate(cfg *config.Config) error {
if cfg.Thumbnail.TransferSecret == "" {
return fmt.Errorf("reva transfer secret is not set up properly, bailing out (%s)", cfg.Service.Name)
return shared.MissingRevaTransferSecretError(cfg.Service.Name)
}
return nil