Simplify the APIs to return http status codes
This commit is contained in:
parent
663cd77c94
commit
6cfc9444f3
9 changed files with 128 additions and 156 deletions
|
@ -42,7 +42,7 @@ func (a *Accountant) RegisterAccount(name string) (acc Account, err error) {
|
|||
// Verify this acount isn't already registered
|
||||
for _, a := range a.Accounts {
|
||||
if a.Name == acc.Name {
|
||||
return Account{}, fmt.Errorf("account name already registered")
|
||||
return Account{}, fmt.Errorf("account name already registered: %s", a.Name)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue