caivega / ipfslib

Other
2 stars 1 forks source link

S4 - jt_createWallet,无效参数,给出的错误info不确切 #187

Closed foreso-GitHub closed 3 years ago

foreso-GitHub commented 3 years ago

jt_createWallet,无效参数,给出的错误info不确切。 比如type参数为'123123',或者" ",或者" SM2",或者""时,错误info是"null key type"。这个版本前错误info是”unknown key type“,更确切一些。 版本: v0.5.4-dev-20210209-f080e8c2b57b52cabd3cef2718439ab6305d3f46 TestCase:FCJT_createWallet_000050

{
    "jsonrpc": "2.0",
    "method": "jt_createWallet",
    "params": [
        {
            "type": " "
        },
        {
            "type": ""
        },
        {
            "type": "    Sm2"
        },
        {
            "type": "12312321"
        }
    ],
    "id": 1
}

{
    "error": {
        "count": 4,
        "desc": "The compound error.",
        "info": "4 errors"
    },
    "id": 1,
    "jsonrpc": "2.0",
    "result": [
        {
            "error": {
                "desc": "Malformed: bad parameter.",
                "info": "null key type"
            },
            "status": -269,
            "type": "temBAD_PARAMETER"
        },
        {
            "error": {
                "desc": "Malformed: bad parameter.",
                "info": "null key type"
            },
            "status": -269,
            "type": "temBAD_PARAMETER"
        },
        {
            "error": {
                "desc": "Malformed: bad parameter.",
                "info": "null key type"
            },
            "status": -269,
            "type": "temBAD_PARAMETER"
        },
        {
            "error": {
                "desc": "Malformed: bad parameter.",
                "info": "null key type"
            },
            "status": -269,
            "type": "temBAD_PARAMETER"
        }
    ],
    "status": 1000,
    "type": "tedCOMPOUND"
}
caivega commented 3 years ago

已经修复,与上一个返回"null key type"的错误一致,下一个版本验证

foreso-GitHub commented 3 years ago

在版本v0.6.4-dev-20210218-f79a420c94324f0e122b265a2e7be26573c78249中验证,已经修复。