fix(api): Added error handling to create and update org http apis and sql update handlers, now checks for org name taken scenarios and returns correct http error code and message, fixes #2686

This commit is contained in:
Torkel Ödegaard
2015-09-08 13:06:18 +02:00
parent fa3329271d
commit daf64421f2
4 changed files with 49 additions and 16 deletions
+2 -1
View File
@@ -7,7 +7,8 @@ import (
// Typed errors
var (
ErrOrgNotFound = errors.New("Organization not found")
ErrOrgNotFound = errors.New("Organization not found")
ErrOrgNameTaken = errors.New("Organization name is taken")
)
type Org struct {