lab3
This commit is contained in:
@@ -52,7 +52,8 @@ func statusForDomainError(err error) int {
|
||||
case errors.Is(err, domain.ErrNotFound):
|
||||
return http.StatusNotFound
|
||||
case errors.Is(err, domain.ErrUsernameTaken),
|
||||
errors.Is(err, domain.ErrConflict):
|
||||
errors.Is(err, domain.ErrConflict),
|
||||
errors.Is(err, domain.ErrIdempotency):
|
||||
return http.StatusConflict
|
||||
case errors.Is(err, domain.ErrValidation),
|
||||
errors.Is(err, domain.ErrUnknownMember),
|
||||
|
||||
Reference in New Issue
Block a user