chore: better errors
This commit is contained in:
parent
1b8cb72476
commit
5fbcec599f
1 changed files with 5 additions and 1 deletions
|
|
@ -47,7 +47,11 @@ func NewEntsoeFromConfig(other map[string]interface{}) (api.Tariff, error) {
|
|||
}
|
||||
|
||||
if cc.Securitytoken == "" {
|
||||
return nil, errors.New("securitytoken must be defined")
|
||||
return nil, errors.New("missing securitytoken")
|
||||
}
|
||||
|
||||
if cc.Domain == "" {
|
||||
return nil, errors.New("missing domain")
|
||||
}
|
||||
|
||||
domain, err := entsoe.Area(entsoe.BZN, strings.ToUpper(cc.Domain))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue