title: Firebase Cloud Function Finished with status: timeout
body: <p>I get the folowing error in the Firebase console : Function execution took 60015 ms. Finished with status: timeout.</p>
  <p>Here is my Cloud Function :</p>
  <pre><code>exports.test = functions.https.onRequest((req, res) =&gt; {
    cors(req, res, () =&gt; {
      const Number = req.body.Number;
  
      return axios.post('https://ws.orias.fr/service?wsdl',
        getXMLNS(Number), {
        headers:
          { 'Content-Type': 'text/xml' },
      },
      )
        .then((res) =&gt; {
          return res.status(200).send(res);
        }).catch((error) =&gt; (error) =&gt; {
          return res.status(500).send(error);
        });
    });
  });
  </code></pre>
  <p>And here is how I call this Cloud Function in my ReactJS Frontend :</p>
  <pre><code>fetch('https://xxx.cloudfunctions.net/test', {
                                          method: 'POST',
                                          headers: {
                                              'Accept': 'application/json',
                                              'Content-Type': 'application/json'
                                          },
                                          body: JSON.stringify({
                                              Number: 'xxx',
                                          })
                                      }).then(res =&gt; res.json()).then(body =&gt; alert(JSON.stringify(body)));
  </code></pre>