equal-aqua
equal-aqua14mo ago

api call logs

Hi, can i see api call logs, in order to verify the correct exchange of variables? thanks a lot
2 Replies
Tico | Voiceflow Assistant
Debug traces in Voiceflow are not visible in production, but they can be seen in the Voiceflow prototype tool. They provide diagnostic information that can help resolve bugs. Here's an example of how to use debug traces in your function code:
export default async function main(args) {
// Your API call
const response = await fetch('https://cat-fact.herokuapp.com/facts');
const responseBody = await response.json();

// Create debug traces
return {
traces: [
{ type: 'text', payload: { message: 'Attempting to retrieve information...' } },
{ type: 'debug', payload: { message: `Failed to retrieve information` } },
],
};
}
export default async function main(args) {
// Your API call
const response = await fetch('https://cat-fact.herokuapp.com/facts');
const responseBody = await response.json();

// Create debug traces
return {
traces: [
{ type: 'text', payload: { message: 'Attempting to retrieve information...' } },
{ type: 'debug', payload: { message: `Failed to retrieve information` } },
],
};
}
In this example, the debug trace will show a failure message, which can help you identify issues. For more detailed information, you can refer to the Voiceflow Functions Documentation.
equal-aqua
equal-aquaOP14mo ago
how can i enable 'debug' option graphically?

Did you find this page helpful?