Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14382197
D13319.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13319.diff
View Options
diff --git a/src/applications/repository/customfield/PhabricatorCommitBranchesField.php b/src/applications/repository/customfield/PhabricatorCommitBranchesField.php
--- a/src/applications/repository/customfield/PhabricatorCommitBranchesField.php
+++ b/src/applications/repository/customfield/PhabricatorCommitBranchesField.php
@@ -29,18 +29,25 @@
'callsign' => $this->getObject()->getRepository()->getCallsign(),
);
- $branches_raw = id(new ConduitCall('diffusion.branchquery', $params))
- ->setUser($this->getViewer())
- ->execute();
-
- $branches = DiffusionRepositoryRef::loadAllFromDictionaries($branches_raw);
- if (!$branches) {
- return;
+ try {
+ $branches_raw = id(new ConduitCall('diffusion.branchquery', $params))
+ ->setUser($this->getViewer())
+ ->execute();
+
+ $branches = DiffusionRepositoryRef::loadAllFromDictionaries(
+ $branches_raw);
+ if (!$branches) {
+ return;
+ }
+
+ $branch_names = mpull($branches, 'getShortName');
+ sort($branch_names);
+ $branch_text = implode(', ', $branch_names);
+ } catch (Exception $ex) {
+ $branch_text = pht('<%s: %s>', get_class($ex), $ex->getMessage());
}
- $branch_names = mpull($branches, 'getShortName');
- sort($branch_names);
- $body->addTextSection(pht('BRANCHES'), implode(', ', $branch_names));
+ $body->addTextSection(pht('BRANCHES'), $branch_text);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 5:56 AM (21 h, 17 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6917663
Default Alt Text
D13319.diff (1 KB)
Attached To
Mode
D13319: Fail gracefully on bad API call when building commit mail
Attached
Detach File
Event Timeline
Log In to Comment