title: API resolved without sending a response for /api/client
body: <p>I'm using NextJS to try and get data back from my API. The <code>client.js</code> API works and I can get data back in my <code>console.log</code>. However, when I post to it from <code>client/[id].js</code>, the response doesn't come back. The error is <code>API resolved without sending a response for /api/client, this may result in stalled requests.</code></p>
  <p><strong>/api/client.js</strong></p>
  <pre><code>export default async function handler(req, res) {
  
  await bigqueryClient.query(options)
       .then(results =&gt; {
         var rows = results[0];
         res.status(200).send(rows)
         //console.log(rows)
       })
       .catch(err =&gt; {
         console.error(err);
       })
  }
  </code></pre>
  <p><strong>/client/[id].js</strong></p>
  <pre><code>export default function Client() {
    const router = useRouter()
  
    //console.log(&quot;id is &quot;+router.query.id)
  
    const [data, setData] = useState(null)
    const [isLoading, setLoading] = useState(false)
  
    useEffect(() =&gt; {
      setLoading(true)
      await axios.post('/api/client', {
        url_id: router.query.id
      })
      .then (res =&gt; {
        console.log(res.data)
        setData(data)
        setLoading(false)
      })
      //})
    })
  
    return (
      &lt;div&gt;
        &lt;Output data={data} /&gt;
      &lt;/div&gt;
    )
  }
  </code></pre>