Skip to content

Commit

Permalink
Minor error message fix
Browse files Browse the repository at this point in the history
  • Loading branch information
demonsh committed Dec 16, 2024
1 parent 0467e99 commit a257b9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/api/display_method.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (s *Server) CreateDisplayMethod(ctx context.Context, request CreateDisplayM
if err != nil {
log.Error(ctx, "Error saving display method", "err", err)
if errors.Is(err, repositories.DisplayMethodDuplicateNameError) {
return CreateDisplayMethod400JSONResponse{N400JSONResponse{Message: "Name already exist"}}, nil
return CreateDisplayMethod400JSONResponse{N400JSONResponse{Message: "name already exist"}}, nil
}
return CreateDisplayMethod500JSONResponse{N500JSONResponse{Message: "Error saving display method"}}, nil
}
Expand Down
2 changes: 1 addition & 1 deletion internal/api/display_method_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func TestServer_CreateDisplayMethod(t *testing.T) {
},
expected: expected{
response: CreateDisplayMethod400JSONResponse{
N400JSONResponse: N400JSONResponse{Message: "Duplicated name display method"},
N400JSONResponse: N400JSONResponse{Message: "name already exist"},
},
httpCode: http.StatusBadRequest,
},
Expand Down

0 comments on commit a257b9f

Please sign in to comment.