fix(api): org name taken error now returns HTTP status code 409, closes
This commit is contained in:
1 parent
f797b19825
commit
53f5cb6553
1 file changed
+1
-1
+1
-1
@@ -84,7 +84,7 @@ func CreateOrg(c *middleware.Context, cmd m.CreateOrgCommand) Response {
|
||||
cmd.UserId = c.UserId
|
||||
if err := bus.Dispatch(&cmd); err != nil {
|
||||
if err == m.ErrOrgNameTaken {
|
||||
return ApiError(400, "Organization name taken", err)
|
||||
return ApiError(409, "Organization name taken", err)
|
||||
}
|
||||
return ApiError(500, "Failed to create organization", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user