title: I keep getting the error "the string did not match the expected pattern" for my fetch request
body: <p>I keep getting the error &quot;the string did not match the expected pattern&quot; for my fetch requests. I've seen some people having similar problems on here and other forums but can't pinpoint the problem.</p>
  <p>What is the cause of the error?</p>
  <pre class="lang-js prettyprint-override"><code>function showRecipes(){
      const ingredients = document.getElementById('ingredients').value.replace(/\s/g, &quot;&quot;);
      const meal = document.getElementById('meal').value;
      const display = document.getElementById('display'); //Where results will go
  
      let url = 'http://www.recipepuppy.com/api/';
      url += `?i=${ingredients}&amp;q=${meal}`;
  
      fetch(url, { mode: &quot;no-cors&quot;})
          .then(response =&gt; {
              response.json()
                  .then(data =&gt; {
                      data.results.forEach(recipe =&gt; {
                          const container = document.createElement('div');
                          container.setAttribute('class', 'container');
  
                          const h1 = document.createElement('h1');
                          h1.textContent = recipe.title;
  
                          const p = document.createElement('p');
                          p.textContent = recipe.ingredients;
  
                          display.appendChild(container);
                          container.appendChild(h1);
                          container.appendChild(p);
                      })
                  })
                  .catch(err =&gt; {
                      console.log(err);
                  })
          })
          .catch(err =&gt; {
              console.log('ERROR: ' + err);
          })
  }
  </code></pre>