milvus-io / pymilvus

Python SDK for Milvus.
Apache License 2.0
1.01k stars 323 forks source link

[Bug]: [milvus_client][Defer] The error message is not valid when input invalid type data to "db_name" of interface "using_database" #1900

Open binbinlv opened 9 months ago

binbinlv commented 9 months ago

Is there an existing issue for this?

Describe the bug

[milvus_client] The error message is not valid when input invalid type data to "db_name" of interface "using_database"

message=database not found[database=%$#])

Expected Behavior

I think here it is better to report like the following error: report the naming rules for db_name if has. here is the error message for invalid partition name in partition related interface:

Invalid partition name: {partition_name}. The first character of a partition name must be an underscore or letter.]

Steps/Code To Reproduce behavior

import time
import numpy as np
from pymilvus import (
    MilvusClient,
)

milvus_client = MilvusClient()
milvus_client.using_database("%$#")

Environment details

- Hardware/Softward conditions (OS, CPU, GPU, Memory):
- Method of installation (Docker, or from source):
- Milvus version (v0.3.1, or v0.4.0):master-20240122-a77693aa
- Pymilvus version: 2.4.0rc26
- Milvus configuration (Settings you made in `server_config.yaml`):

Anything else?

No response

binbinlv commented 9 months ago

/assign @czs007

czs007 commented 8 months ago

server did not validate database

yanliang567 commented 6 days ago

if trying to using a chinese db_name, the error msg is not expected: Error(code=1, message=Unexpected error, message=<metadata was invalid: [('dbname', '中文')]>) expected msg: 'err_msg': 'database not found[database=中文]'