Hi, I’m fairly new to JS and Pipedream (which is incredible) so this may be a silly mistake but I’m getting a Syntax Error after sending requests to some endpoints in the Locate API and can’t find the solution.
Requests to other endpoints I’ve tried work fine but there’s something about this particular one that’s causing problems.
I thought it might be the double-quotes so tried escaping them but that didn’t work either.
I wrote a script that accesses the same url and ran that through Node on my own machine and that worked. The response’s data is JSON and looks normal so I’m stumped.
Have you all seen this before or have some advice? Thanks!
@jphillips thanks for reaching out! Would you mind clicking the Share button in the top-right of your workflow and share it with dylan@pipedream.com? I’d like to take a look at the specific event data that’s yielding this error to guide you in the right direction.
Thanks @jphillips . This error is obtuse but the API was essentially returning a response that we were interpreting as JSON and couldn’t properly serialize. I modified the code of the step a bit to return the actual error being returned from the API:
Improperly escaped filter.
Does that error make sense in the context of the filter you’re trying to use? Do the docs note anything that would help you in this circumstance?
Thanks for looking into this!
Locate’s docs actually don’t have anything on using the filter - they just recommend using the same requests as your browser and that’s how I got that URL.
But I think it’s finding the data now.
I noticed the URL in the step you modified didn’t have the double-quotes around the search parameter so I changed the script I have to match and saw the Improperly escaped filter error. I put the quotes back into the step that you modified and now the response data is logged to the console. So it seems like what you did to make it log the data also fixed it? Can that be exported to another step with a return?
Thanks again.
That’s great. Yes, if you’re seeing the correct data now, you can return that and access it in future steps. Let me know if that works or if you encounter any other issues.
Could you help we with the same problem please? It all was okay and worked great, but suddenly it broke, I don’t know why and don’t know how to solve it. I have YouTube Data API and Notion API