function submitCommand()

in js/details.js [630:663]


function submitCommand(url, bugId, jsonData) {
  if (ChangeListTest) {
    return;
  }
  console.log("submitting changes to bugzilla:", bugId);
  $.ajax({
    url: url,
    type: 'PUT',
    data: jsonData,
    contentType: "application/json",
    success: function (data) {
      // success response 
      // Object { message: null, error: true, documentation: "http://www.bugzilla.org/docs/4.2/en/html/api/", code: 100500 }
      if (data && data.error) {
        console.log("bugzilla error on request:", data.code, "bug id:", bugId);
        updateAfterError(bugId, 'error code:' + data.code);
      } else {
        updateAfterChanges(bugId);
      }
    }
  }).error(function (jqXHR, textStatus, errorThrown) {
      console.log("status:", textStatus);
      console.log("error thrown:", errorThrown);
      console.log("response text:", jqXHR.responseText);
      try {
        let info = JSON.parse(jqXHR.responseText);
        let text = info.message ? info.message : errorThrown;
        updateAfterError(bugId, text);
        return;
      } catch(e) {
      }
      updateAfterError(bugId, errorThrown);
    });
}