Search code examples
node.jsaxiosasanaasana-api

(Asana) XML is invalid: Headers are not supported on this surface


I am pretty sure I am using exactly the same code in the following two cases, as I tested it on Postman first.

The first time I tried to create a task from Postman, it has no issue.

The next time I tried to do the same from my NodeJS server, and it shows this error. I tried the client SDK package and manually calling through Axios, both are not working and throwing the same error.

Is the Asana API not callable from NodeJS server?


Solution

  • It turns out the "Headers" does not indicate the Headers sent with the request, but the "Headers" HTML Element inside the rich text field. Ensure there's no h1-h6 element in your html_notes can solve this issue.