mirror of
https://github.com/zitadel/zitadel.git
synced 2025-05-01 17:30:50 +00:00
return error on file not found and added log ids and messages
This commit is contained in:
parent
af8905036b
commit
7ef62528d1
@ -7,7 +7,6 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/BurntSushi/toml"
|
"github.com/BurntSushi/toml"
|
||||||
"github.com/caos/logging"
|
|
||||||
"github.com/ghodss/yaml"
|
"github.com/ghodss/yaml"
|
||||||
|
|
||||||
"github.com/caos/zitadel/internal/errors"
|
"github.com/caos/zitadel/internal/errors"
|
||||||
@ -62,8 +61,7 @@ func readConfigFile(configReader Reader, configFile string, obj interface{}) err
|
|||||||
configFile = os.ExpandEnv(configFile)
|
configFile = os.ExpandEnv(configFile)
|
||||||
|
|
||||||
if _, err := os.Stat(configFile); err != nil {
|
if _, err := os.Stat(configFile); err != nil {
|
||||||
logging.LogWithFields("CONFI-Hs93M", "file", configFile).WithError(err).Warn("config file does not exist")
|
return errors.ThrowNotFoundf(err, "CONFI-Hs93M", "config file %s does not exist", configFile)
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configStr, err := ioutil.ReadFile(configFile)
|
configStr, err := ioutil.ReadFile(configFile)
|
||||||
|
@ -10,5 +10,5 @@ type Config struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Start(ctx context.Context, config Config) error {
|
func Start(ctx context.Context, config Config) error {
|
||||||
return errors.ThrowUnimplemented(nil, "", "") //TODO: implement
|
return errors.ThrowUnimplemented(nil, "ADMIN-n8vw5", "not implemented yet") //TODO: implement
|
||||||
}
|
}
|
||||||
|
@ -10,5 +10,5 @@ type Config struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Start(ctx context.Context, config Config) error {
|
func Start(ctx context.Context, config Config) error {
|
||||||
return errors.ThrowUnimplemented(nil, "", "") //TODO: implement
|
return errors.ThrowUnimplemented(nil, "AUTH-l7Hdx", "not implemented yet") //TODO: implement
|
||||||
}
|
}
|
||||||
|
@ -10,5 +10,5 @@ type Config struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Start(ctx context.Context, config Config) error {
|
func Start(ctx context.Context, config Config) error {
|
||||||
return errors.ThrowUnimplemented(nil, "", "") //TODO: implement
|
return errors.ThrowUnimplemented(nil, "EVENT-1hfiu", "not implemented yet") //TODO: implement
|
||||||
}
|
}
|
||||||
|
@ -10,5 +10,5 @@ type Config struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Start(ctx context.Context, config Config) error {
|
func Start(ctx context.Context, config Config) error {
|
||||||
return errors.ThrowUnimplemented(nil, "", "") //TODO: implement
|
return errors.ThrowUnimplemented(nil, "MANAG-h3k3x", "not implemented yet") //TODO: implement
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user