HomePhabricator

Get rid of "throwResult()" for control flow in MFA factors

Description

Get rid of "throwResult()" for control flow in MFA factors

Summary: Depends on D20034. Ref T13222. This is just cleanup -- I thought we'd have like two of these, but we ended up having a whole lot in Duo and a decent number in SMS. Just let factors return a result explicitly if they can make a decision early. I think using instanceof for control flow is a lesser evil than using catch, on the balance.

Test Plan: grep, went through enroll/gate flows on SMS and Duo.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13222

Differential Revision: https://secure.phabricator.com/D20035

Details

Provenance
epriestleyAuthored on Jan 25 2019, 6:02 PM
epriestleyPushed on Jan 28 2019, 5:40 PM
Reviewer
amckinley
Differential Revision
D20035: Get rid of "throwResult()" for control flow in MFA factors
Parents
rPbce44385e1e3: Add more factor details to the Settings factor list
Branches
Unknown
Tags
Unknown
Tasks
T13222: 2018 Week 48-51 Bonus Content
Build Status
Buildable 21718
Build 29630: Run Core Tests