fix wrong error message

The old message was copied over from the layer3domains.
This commit is contained in:
Gibheer 2021-05-09 20:32:05 +02:00
parent 7c986e59ec
commit b3b14b9894
1 changed files with 2 additions and 2 deletions

View File

@ -45,8 +45,8 @@ func PoolCreate(c *Context, req Request, res *Response) error {
_, err = c.tx.Exec(`insert into pools(name, created_by, modified_by, attributes, layer3domain_id)
values ($1, $2, $2, $3, $4)`, name, c.username, attrs, l3id)
if err != nil {
res.AddMessage(LevelError, "could not create new layer3domain")
return fmt.Errorf("could not create new layer3domain '%s': %#v", name, err)
res.AddMessage(LevelError, "could not create new pool")
return fmt.Errorf("could not create new pool '%s': %#v", name, err)
}
res.AddMessage(LevelInfo, "created pool '%s'", name)
return nil