0

I created my zap and Run javascirpt code by zapier, I get the following error:

We had trouble sending your test through.

> TypeError: Request path contains unescaped characters

What does that mean? It is a problem about my code or the input data?

My code is:

fetch(
  "test.s2.com.tr/Musteri/WebForm?_name=" +
    inputData._name +
    "&_email=" +
    inputData._email +
    "&_phone=" +
    inputData._phone +
    "&_source=" +
    inputData._source +
    "&_projeid=59b8d58fcec19d1f"
)
  .then(function(res) {
    return res.json();
  })
  .then(function(json) {
    callback(null, json);
  })
  .catch(callback);
xavdid
  • 5,092
  • 3
  • 20
  • 32
edadb
  • 1
  • can you post any of your code? namely, the url you're trying to request? – xavdid Oct 23 '19 at 17:12
  • yes ı can post my code , fetch('https://test.s2.com.tr/Musteri/WebForm?_name=' + inputData._name + '&_email=' + inputData._email + '&_phone=' + inputData._phone + '&_source='+inputData._source+'&_projeid=59b8d58fcec19d1f') .then(function(res){ return res.json(); }).then(function(json) { callback(null, json); }).catch(callback); – edadb Oct 24 '19 at 13:22

1 Answers1

0

Your issue is probably a duplicate of this question. Basically, you have characters in one of those 4 inputs that doesn't belong in a url. Use encodeURIComponent to remedy that.

xavdid
  • 5,092
  • 3
  • 20
  • 32
  • Actually the problem may be that input datas are included Turkish characters. How do I make sure it doesn't care about Turkish characters!!! – edadb Oct 28 '19 at 11:44
  • When I connected my zaps Lead A (is included turkish characters in inputdata ex; ş,ç,ğ,ö,ü....), Zap won't work. – edadb Oct 28 '19 at 11:48
  • See my answer - use `encodeURIComponent` on the input. – xavdid Oct 29 '19 at 21:59