Differential - return a better response for validation error cases

Summary: Fixes T6989. Basically return a nice dialogue like we do for "NoEffect" transactions. This is a little prettier than the other dialogue was. Also, stop adding TYPE_EDGE as a transaction type as we end up having it 2x, which then makes the error get validated 2x.

Test Plan: tried to add myself as a reviewer and got a nice error message.

Reviewers: chad, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6989

Differential Revision: https://secure.phabricator.com/D11448
This commit is contained in:
Bob Trahan
2015-01-20 13:59:17 -08:00
parent 77bcbed9f9
commit 847ff549ce
4 changed files with 54 additions and 3 deletions

View File

@@ -127,8 +127,9 @@ final class DifferentialCommentSaveController
->setCancelURI($revision_uri)
->setException($ex);
} catch (PhabricatorApplicationTransactionValidationException $ex) {
// TODO: Provide a nice Response for rendering these in a clean way.
throw $ex;
return id(new PhabricatorApplicationTransactionValidationResponse())
->setCancelURI($revision_uri)
->setException($ex);
}
$user = $request->getUser();