title: Google sheets scripts function UrlFetchApp.fetch does not run from .onEdit(e) but works from editor
body: <p>I have created a google sheet with a lot of info for a beach volleyball cup and I want to call an API I have created when a checkbox is checked in this sheet. </p>
  
  <pre class="lang-js prettyprint-override"><code>function onEdit(e){
    const ui = SpreadsheetApp.getUi();
    const spreadsheets = SpreadsheetApp.getActive();
    const configSheet = spreadsheets.getSheetByName("Config")
    var tourneyId = String(configSheet.getRange(2,4).getValue())
    var tourneyTitle = String(configSheet.getRange(2,5).getValue())
    var sheet = spreadsheets.getActiveSheet()
    if (sheet.getName() == "LiveScore"){
      var actRng = sheet.getActiveRange();
      var editColumn = actRng.getColumn();
      var rowIndex = actRng.getRowIndex();
      actRng = actRng.getCell(1, 1);
      var headers = sheet.getRange(1, 1, 1, sheet.getLastColumn()).getValues();
      if(editColumn == 7 &amp;&amp; rowIndex != 1){
        onStartBroadcastClicked(actRng, ui, sheet, rowIndex, editColumn, tourneyTitle);
      }
    }
  }
  </code></pre>
  
  <p>There is never any problems with this part as I see it. But when i get into the function onStartBroadcastClicked:</p>
  
  <pre class="lang-js prettyprint-override"><code>function onStartBroadcastClicked(actRng, ui, sheet, rowIndex, editColumn, tourneyTitle){
    var homeTeam = String(sheet.getRange(rowIndex, 14).getValue());
  ... // more setting variables
    var endTime = new Date(startTime.getTime() + MILLIS_PER_MATCH);
  
    if(actRng.isChecked()){
      var response = ui.alert("You are about to start a new broadcast. Are you sure?" +
                              "\n Title: " + title, ui.ButtonSet.YES_NO);
      if (response == ui.Button.YES) {
        var httpRequest = "https://someUrl";
        var options =
            {
              'method':'POST',
              'contentType': 'application/json',
              'payload' : JSON.stringify({
                "title" : title,
                    ... // setting all variables
                "description" : description
              }),
              'muteHttpExceptions' : true,
              'headers' : {
                "Authorization": "Basic " + Utilities.base64Encode(USERNAME + ":" + PASSWORD)
              }
            };
  
        ui.alert("Waiting.......")
        var result = UrlFetchApp.fetch(httpRequest, options);
        ui.alert(result.getContentText())
  </code></pre>
  
  <p>The issue is that it always gets to the line <code>ui.alert("Waiting.......")</code>, but when triggered from the checkbox, it never succeeds the http POST request. If I click play inside the editor, it succeeds and I got the response in the alertbox. </p>
  
  <p>Could it be some timeout or some autosave issues? Does anyone have any idea if where to keep looking? I've been stuck here for some time now and I would be really happy if anyone can point me to the correct direction.</p>