@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Catch errors creating mocks

Summary: Fixes T16379

Test Plan:
- Go to https://phorge.localhost/pholio/create
- Add an image
- Leave all other fields blank
- See the form with a validation error ("Mocks must have a name"), not an unhandled exception

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16379

Differential Revision: https://we.phorge.it/D26565

Pppery a8c53585 5dcf8f6c

+7 -4
+7 -4
src/applications/pholio/controller/PholioMockEditController.php
··· 212 212 ->setContinueOnNoEffect(true) 213 213 ->setActor($viewer); 214 214 215 - $xactions = $editor->applyTransactions($mock, $xactions); 216 - 217 - return id(new AphrontRedirectResponse()) 218 - ->setURI('/M'.$mock->getID()); 215 + try { 216 + $xactions = $editor->applyTransactions($mock, $xactions); 217 + return id(new AphrontRedirectResponse()) 218 + ->setURI('/M'.$mock->getID()); 219 + } catch (PhabricatorApplicationTransactionValidationException $ex) { 220 + $errors = mpull($ex->getErrors(), 'getMessage'); 221 + } 219 222 } 220 223 } 221 224