We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
feat: add stringify_pydantic_error util


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/bk-user/bkuser/common/passwd/__init__.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 """
3 TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available.
4 Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
5 Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at http://opensource.org/licenses/MIT
7 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
8 an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
9 specific language governing permissions and limitations under the License.
10 """
11 from .exceptions import PasswordStrengthError
12 from .generator import PasswordGenerator
13 from .models import PasswordRule, ValidateResult
14 from .validator import PasswordValidator
15 
16 __all__ = [
17     # 密码规则
18     "PasswordRule",
19     # 密码生成器
20     "PasswordGenerator",
21     # 密码强度校验器
22     "PasswordValidator",
23     # 密码校验结果
24     "ValidateResult",
25     # 密码强度过低异常
26     "PasswordStrengthError",
27 ]
28
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/bk-user/bkuser/common/passwd/__init__.py b/src/bk-user/bkuser/common/passwd/__init__.py
--- a/src/bk-user/bkuser/common/passwd/__init__.py
+++ b/src/bk-user/bkuser/common/passwd/__init__.py
@@ -8,7 +8,7 @@
 an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 specific language governing permissions and limitations under the License.
 """
-from .exceptions import PasswordStrengthError
+from .exceptions import PasswordGenerateError, PasswordStrengthError
 from .generator import PasswordGenerator
 from .models import PasswordRule, ValidateResult
 from .validator import PasswordValidator
@@ -24,4 +24,6 @@
     "ValidateResult",
     # 密码强度过低异常
     "PasswordStrengthError",
+    # 不合理的规则导致生成密码失败
+    "PasswordGenerateError",
 ]

{"golden_diff": "diff --git a/src/bk-user/bkuser/common/passwd/__init__.py b/src/bk-user/bkuser/common/passwd/__init__.py\n--- a/src/bk-user/bkuser/common/passwd/__init__.py\n+++ b/src/bk-user/bkuser/common/passwd/__init__.py\n@@ -8,7 +8,7 @@\n an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the\n specific language governing permissions and limitations under the License.\n \"\"\"\n-from .exceptions import PasswordStrengthError\n+from .exceptions import PasswordGenerateError, PasswordStrengthError\n from .generator import PasswordGenerator\n from .models import PasswordRule, ValidateResult\n from .validator import PasswordValidator\n@@ -24,4 +24,6 @@\n     \"ValidateResult\",\n     # \u5bc6\u7801\u5f3a\u5ea6\u8fc7\u4f4e\u5f02\u5e38\n     \"PasswordStrengthError\",\n+    # \u4e0d\u5408\u7406\u7684\u89c4\u5219\u5bfc\u81f4\u751f\u6210\u5bc6\u7801\u5931\u8d25\n+    \"PasswordGenerateError\",\n ]\n", "issue": "feat: add stringify_pydantic_error util\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\nTencentBlueKing is pleased to support the open source community by making \u84dd\u9cb8\u667a\u4e91-\u7528\u6237\u7ba1\u7406(Bk-User) available.\nCopyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.\nLicensed under the MIT License (the \"License\"); you may not use this file except in compliance with the License.\nYou may obtain a copy of the License at http://opensource.org/licenses/MIT\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on\nan \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\"\"\"\nfrom .exceptions import PasswordStrengthError\nfrom .generator import PasswordGenerator\nfrom .models import PasswordRule, ValidateResult\nfrom .validator import PasswordValidator\n\n__all__ = [\n    # \u5bc6\u7801\u89c4\u5219\n    \"PasswordRule\",\n    # \u5bc6\u7801\u751f\u6210\u5668\n    \"PasswordGenerator\",\n    # \u5bc6\u7801\u5f3a\u5ea6\u6821\u9a8c\u5668\n    \"PasswordValidator\",\n    # \u5bc6\u7801\u6821\u9a8c\u7ed3\u679c\n    \"ValidateResult\",\n    # \u5bc6\u7801\u5f3a\u5ea6\u8fc7\u4f4e\u5f02\u5e38\n    \"PasswordStrengthError\",\n]\n", "path": "src/bk-user/bkuser/common/passwd/__init__.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\nTencentBlueKing is pleased to support the open source community by making \u84dd\u9cb8\u667a\u4e91-\u7528\u6237\u7ba1\u7406(Bk-User) available.\nCopyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.\nLicensed under the MIT License (the \"License\"); you may not use this file except in compliance with the License.\nYou may obtain a copy of the License at http://opensource.org/licenses/MIT\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on\nan \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\"\"\"\nfrom .exceptions import PasswordGenerateError, PasswordStrengthError\nfrom .generator import PasswordGenerator\nfrom .models import PasswordRule, ValidateResult\nfrom .validator import PasswordValidator\n\n__all__ = [\n    # \u5bc6\u7801\u89c4\u5219\n    \"PasswordRule\",\n    # \u5bc6\u7801\u751f\u6210\u5668\n    \"PasswordGenerator\",\n    # \u5bc6\u7801\u5f3a\u5ea6\u6821\u9a8c\u5668\n    \"PasswordValidator\",\n    # \u5bc6\u7801\u6821\u9a8c\u7ed3\u679c\n    \"ValidateResult\",\n    # \u5bc6\u7801\u5f3a\u5ea6\u8fc7\u4f4e\u5f02\u5e38\n    \"PasswordStrengthError\",\n    # \u4e0d\u5408\u7406\u7684\u89c4\u5219\u5bfc\u81f4\u751f\u6210\u5bc6\u7801\u5931\u8d25\n    \"PasswordGenerateError\",\n]\n", "path": "src/bk-user/bkuser/common/passwd/__init__.py"}]}