Open Vadorequest opened 5 years ago
I figured it out by debugging the code: Added a console.error to pinpoint the erroring message at MessageSet.js
static extractPayloadsFromMessageSet (messages) {
var messagePayloadSet = [];
for (var i = 0; i < messages.length; i++) {
messagePayloadSet.push(messages[i].exportCreatePayload());
if (last(messagePayloadSet) instanceof Error) {
console.error('--err messages[i]', messages[i])
// return the error
return last(messagePayloadSet);
}
}
return messagePayloadSet;
}
The check that is done is basically checking that all those fields are strings:
const MSG_UPDATE_EXPORT_KEYS = ['api_key', 'message_id', 'intent', 'feedback', 'version'];
In my case, the message
field was null in the message that was the agent response.
I have the following code:
Which produce the following output:
Then, I do some dynamic
version
resolving:But I get the following anyway:
Even if I provide a proper
version
at the beginning, same result.It is really not nice to have the same debug message at every try, you should consider improving the debugging DX here and let us know what's wrong exactly. It's a waste of time for everyone who tries to use this tool.