aliyun / csb-sdk

The CSB-SDK is a client-side invocation SDK for HTTP or Web Service API opened by the CSB (Cloud Service Bus) product. It is responsible for invoking the open API and signing the request information.
Other
63 stars 48 forks source link

How to fix [517]json2hsf process error #8

Closed EvanXzj closed 5 years ago

EvanXzj commented 5 years ago

您好,请问如何解决 [517]json2hsf process error 错误?

以下是我的伪代码:

const {CONTENT_TYPE_JSON, Client} = require('aliware-csb')

const client = new Client()

async function fn() {
    try {
        const url = 'httpURL'
        var responseHeaders = {}

        var result = await client.post(  
            url,
            {
                api:"api_name", 
                version: "1.0.0",
                accessKey: 'ak',
                secretKey: 'sk',
                headers: {   
                    'content-type': CONTENT_TYPE_JSON
                },
                query: {},
                data: {
                    leadWithCarCodeDto: { name: '测试先生999', cellPhone1: '13162539999' },
                    leadSource: { behavior: 'keep_in_touch' },
                    leadType: 0
                }
            },
            responseHeaders  
        );

        console.log(result)
    } catch (error) {
        console.error('error: ', error)
    }
}

fn()

错误信息:

{
   "code":500,
  "message":"[517]json2hsf process error, json to hsf invoke error-param is necessary,but not found 
   from you params,paramTypeName is : com.dtdream.dop.lead.dto.LeadWithCarCodeDto, param 
   name is : leadWithCarCodeDto",
  "requestId":"ID-izbp120gz8zjya2hihouzlz-46564-1529585767806-2-393332299"
}

我在data中已传了leadWithCarCodeDto的信息, 貌似不能被正确读取。望请回复,万分感谢!!!

simonzcx commented 2 years ago

请问怎么解决的呢?