phacility/phabricator · error · Exception

Invalid mode "%s".

Error message

Invalid mode "%s".

What it means

Error "Invalid mode "%s"." thrown in phacility/phabricator.

Source

Thrown at src/applications/diffusion/conduit/DiffusionUpdateCoverageConduitAPIMethod.php:103

    $conn->openTransaction();
    $mode = $request->getValue('mode');
      switch ($mode) {
        case '':
        case 'overwrite':
          // sets the coverage for the whole branch, deleting all previous
          // coverage information
          queryfx(
            $conn,
            'DELETE FROM %T WHERE branchID = %d',
            $table_name,
            $branch->getID());
          break;
        case 'update':
          // sets the coverage for the provided files on the specified commit
          break;
        default:
          $conn->killTransaction();
          throw new Exception(pht('Invalid mode "%s".', $mode));
      }

      foreach (PhabricatorLiskDAO::chunkSQL($sql) as $chunk) {
        queryfx(
          $conn,
          'INSERT INTO %T (branchID, pathID, commitID, coverage) VALUES %LQ'.
          ' ON DUPLICATE KEY UPDATE coverage = VALUES(coverage)',
          $table_name,
          $chunk);
      }
    $conn->saveTransaction();
  }

}

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/diffusion/conduit/DiffusionUpdateCoverageConduitAPIMethod.php:103 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/b0abdbdb72ebd30e. Report an issue: GitHub.