Skip to content

Commit

Permalink
fix: error message fix for duplicate model name (#10149)
Browse files Browse the repository at this point in the history
  • Loading branch information
keita-determined authored Oct 30, 2024
1 parent 8c95047 commit ea0bb8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions master/internal/api_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func (a *apiServer) PostModel(

if err != nil && strings.Contains(err.Error(), db.CodeUniqueViolation) {
return nil,
status.Errorf(codes.AlreadyExists, "avoid names equal to other models (case-insensitive)")
status.Errorf(codes.AlreadyExists, "avoid names equal to other models (case-sensitive)")
}
return &apiv1.PostModelResponse{Model: m},
errors.Wrapf(err, "error creating model %q in database", req.Name)
Expand Down Expand Up @@ -426,7 +426,7 @@ func (a *apiServer) PatchModel(

if err != nil && strings.Contains(err.Error(), db.CodeUniqueViolation) {
return nil,
status.Errorf(codes.AlreadyExists, "avoid names equal to other models (case-insensitive)")
status.Errorf(codes.AlreadyExists, "avoid names equal to other models (case-sensitive)")
}
return &apiv1.PatchModelResponse{Model: finalModel},
errors.Wrapf(err, "error updating model %q in database", currModel.Name)
Expand Down

0 comments on commit ea0bb8a

Please sign in to comment.