title: Not able to res.send() server response, but able to console.log the same response with Express
body: <p>I'm working on a custom integration solution using Express routes and after making a fetch call to firebase I need the response to my server to be the one coming from firebase to show me any issues (such as authentication errors) coming from there.</p>
  <p>I've been trying to display the response by using res.send(), but it throws me a &quot;TypeError: Converting circular structure to JSON&quot; error, but when console.logging that same response it gives me the correct response (which is an authentication error). What's the deal with that?</p>
  <p>Here's the code:</p>
  <pre><code>router.route(&quot;/bankval&quot;).get (fetchAirtabeleRecords, (req, res) =&gt; {
  
      fetch(`https://xxxxxxxxxxxx.firebaseio.com/integratedData.json?auth=${FIREBASESECRET}`,{
      method: 'PUT',
      headers:
      {
          Authorization: 'Bearer ' + FIREBASESECRET,
          'Content-Type': 'application/json'
      },
  
      body: JSON.stringify({bankValuation: res.bankVal}) // correct values here
  })
  
  .then((res) =&gt; res.json())
  
  .then(res.send(res)) // This throws me the error
  
  .then((res)=&gt; { console.log('response: ', res); }) // This works and displays expected &quot;error: 'Unauthorized request.' from firebase, but it's only in console, so it's not good enough.&quot;
  
  
  // .then(res.send({bankValuation: res.bankVal}))   // this works, but if authentication error occurs it still displays the correct data, when it's obviously not sent to firebase. Only using this for testing purposes.
  
  .catch(err=&gt; { console.log('error: ',err); }) })
  </code></pre>
  <p>I'm pretty new to this, so maybe I'm doing this completely backwards or something, but any input is appreciated.</p>
  <p>Thanks.</p>