mirror of
https://github.com/zitadel/zitadel.git
synced 2025-05-01 22:10:52 +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"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
"github.com/caos/logging"
|
||||
"github.com/ghodss/yaml"
|
||||
|
||||
"github.com/caos/zitadel/internal/errors"
|
||||
@ -62,8 +61,7 @@ func readConfigFile(configReader Reader, configFile string, obj interface{}) err
|
||||
configFile = os.ExpandEnv(configFile)
|
||||
|
||||
if _, err := os.Stat(configFile); err != nil {
|
||||
logging.LogWithFields("CONFI-Hs93M", "file", configFile).WithError(err).Warn("config file does not exist")
|
||||
return nil
|
||||
return errors.ThrowNotFoundf(err, "CONFI-Hs93M", "config file %s does not exist", configFile)
|
||||
}
|
||||
|
||||
configStr, err := ioutil.ReadFile(configFile)
|
||||
|
@ -10,5 +10,5 @@ type Config struct {
|
||||
}
|
||||
|
||||
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 {
|
||||
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 {
|
||||
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 {
|
||||
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