mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
1fdcb1bfc2
* Error early if email already exists * Update changes/issue-4361-mail-change-should-error Co-authored-by: Michal Nicpon <39177923+michalnicp@users.noreply.github.com> * Fix test * Lint fixes * Fix another test * Also check for invites * Improve error checks * Update comment * Update tests * Fix test Co-authored-by: Michal Nicpon <39177923+michalnicp@users.noreply.github.com>
24 lines
386 B
Go
24 lines
386 B
Go
package service
|
|
|
|
type badRequestError struct {
|
|
message string
|
|
}
|
|
|
|
func (e *badRequestError) Error() string {
|
|
return e.message
|
|
}
|
|
|
|
func (e *badRequestError) BadRequestError() []map[string]string {
|
|
return nil
|
|
}
|
|
|
|
type alreadyExistsError struct{}
|
|
|
|
func (a alreadyExistsError) Error() string {
|
|
return "Entity already exists"
|
|
}
|
|
|
|
func (a alreadyExistsError) IsExists() bool {
|
|
return true
|
|
}
|