title: Deploying Google Cloud Functions ResponseError: The updateMask field contains event_trigger but it is not present in CloudFunction resource
body: <p>I just started getting an error when trying to deploy a google cloud HTTP function using: </p>
  
  <pre><code>gcloud functions deploy http_function --trigger-http
  </code></pre>
  
  <p>And now I'm getting an error like this:</p>
  
  <pre><code>ERROR: (gcloud.functions.deploy) ResponseError: status=[400], code=[Bad Request], message=[The request has errors
  Problems:
  The updateMask field contains event_trigger but it is not present in CloudFunction resource.
  ]
  </code></pre>
  
  <p>The function deployed fine earlier and I've only fiddled with the some code inside, nothing that I believe should give me this error.</p>
  
  <p>My cloud function looks like this:</p>
  
  <pre><code>exports.http_function = (req, res) =&gt; {
      if (req.method === 'POST') {
          // some code and then
          res.json(jsonVariable);
      } else {
          const error = new Error('Only POST requests are accepted');
          error.code = 405;
          console.error(error);
          res.status(error.code || 500).send(error);
          throw error;
      }
  }
  </code></pre>
  
  <p>If anyone has some insight as to what might cause this error, I'd greatly appreciate it, because I'm struggling to find info on it?</p>
  
  <p><strong>EDIT:</strong> It only seems to happen sometimes, so now I definitely believe it's something wrong with gcloud.</p>