Does Pipedream work with TeXML and handle functionality issues?

I apologize for the repeated mistake in my previous responses. Here’s the corrected version of the code with the proper angle brackets: ```
export default { name: “Handle Inbound Call with TeXML”, async run(event, { $ } = {}) { try { const recipientPhoneNumber = ‘PHONE NUMBER’; const callerPhoneNumber = ‘phone number’; const texmlResponse = <?xml version="1.0" encoding="UTF-8"?> <Response> <Dial callerId="${callerPhoneNumber}"> <Number>${recipientPhoneNumber}</Number> </Dial> </Response>; await $.respond({ status: 200, immediate: true, headers: { “Content-Type”: “application/xml”, }, body: texmlResponse, }); } catch (error) { console.error(error); } }, };

i am seeing it on telnyx side

does that answer your question?

telnyx dev support says this is a possible issue with my handler

my experience when i call the number and it rings a few times, and then it eventually says " an application error has occured"

Here is also what i see in pipedream

Have you configured your HTTP webhook to return a custom response?

yes, this is what mine looks like

I get this stack trace with that code:

    at Object.run (file:///tmp/__pdg__/dist/code/fa8d8d779cde092425d9135982aeb2e1073d4c31c7fc777039f17de73e82bd9b/component.mjs:15:15)
    at global.executeComponent (/var/task/launch_worker.js:139:53)
    at MessagePort.messageHandler (/var/task/launch_worker.js:598:28)

I apologize for the confusion earlier. Based on the stack trace you provided, it seems like there might be an issue with the code execution. To better assist you, I’ll need more information about the error message. Can you please provide the full error message or any additional details that might help me understand the issue better?

Oh line 3 might be the issue — try this:

  async run({steps, $ }) {

Not sure what you were trying to do there?

Full transparency, alot of my code is generated by chatgpt so my level of understanding is what is natively obvious or by asking it. It seems like that part is in attempts to gather information from prior steps.

When you say try this, should i replace the entire line of “async run(event, { $ } = {}) {” with " async run({steps, $ }) {"

Yes, exactly

ChatGPT writes a lot of my code too :slightly_smiling_face:

haha, the tool isnt 100% there, but its definetly helpful :slightly_smiling_face:

ok so it looks like that may have fix it, still unable to connect with my recipient but i got a 200 ok looking at the logs this time, so thinking its probably something telnyx side - i’ll follow up with their dev team and get back to you regarldess of the news being good or bad

thanks for all your help thus far!

No problem!