Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine exception message of duplicate key #3219

Merged

Conversation

JohnNiang
Copy link
Member

What type of PR is this?

/kind improvement
/area core
/milestone 2.3.x

What this PR does / why we need it:

I create another exception DuplicateNameException to map org.springframework.dao.DuplicateKeyException when creating extensions.

See #3180 for more.

Which issue(s) this PR fixes:

Fixes #3180

Special notes for your reviewer:

  1. Try to create an user which name has already exist
  2. See the error

Does this PR introduce a user-facing change?

优化名称重复的错误提示

Signed-off-by: John Niang <johnniang@fastmail.com>
@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/improvement Categorizes issue or PR as related to a improvement. labels Feb 3, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.3.x milestone Feb 3, 2023
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Feb 3, 2023
Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 3, 2023
Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Feb 3, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit df97ee8 into halo-dev:main Feb 3, 2023
@JohnNiang JohnNiang modified the milestones: 2.3.x, 2.3.0 Feb 6, 2023
@ruibaby
Copy link
Member

ruibaby commented Feb 10, 2023

/cherry-pick release-2.2

@halo-dev-bot
Copy link
Collaborator

@ruibaby: #3219 failed to apply on top of branch "release-2.2":

Applying: Refine exception message of duplicate key
Using index info to reconstruct a base tree...
M	src/main/resources/config/i18n/messages.properties
M	src/main/resources/config/i18n/messages_zh.properties
Falling back to patching base and 3-way merge...
Auto-merging src/main/resources/config/i18n/messages_zh.properties
Auto-merging src/main/resources/config/i18n/messages.properties
CONFLICT (content): Merge conflict in src/main/resources/config/i18n/messages.properties
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Refine exception message of duplicate key
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-2.2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ruibaby
Copy link
Member

ruibaby commented Feb 10, 2023

/cherry-pick release-2.2

@halo-dev-bot
Copy link
Collaborator

@ruibaby: new pull request created: #3278

In response to this:

/cherry-pick release-2.2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@JohnNiang JohnNiang deleted the refactor/optimize-duplicate-key-error branch February 10, 2023 06:36
f2c-ci-robot bot pushed a commit that referenced this pull request Feb 10, 2023
This is an automated cherry-pick of #3219

/assign ruibaby

```release-note
优化名称重复的错误提示
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

添加用户,如果有重名用户,报错信息有误
4 participants