Page MenuHomePhabricator

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

Authored by epriestley on Jan 25 2019, 6:07 PM.



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.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Jan 25 2019, 6:07 PM
epriestley requested review of this revision.Jan 25 2019, 6:08 PM
amckinley accepted this revision.Jan 26 2019, 7:18 PM
This revision is now accepted and ready to land.Jan 26 2019, 7:18 PM
This revision was automatically updated to reflect the committed changes.