Conversation
c55fd4e to
64dba0f
Compare
vpomerleau
left a comment
There was a problem hiding this comment.
Thanks for adding this safety in so we can make sure the feature is fully off when needed. I was wondering if we needed to differentiate between turning the feature off for adding new phones vs using existing phones as we're doing on the frontend but it's probably unnecessary/overkill.
- Would we want tests for when the config is set to false?
|
@dschom We also have this error fxa/packages/fxa-auth-server/lib/error.js Line 488 in 7e8a95f |
|
@vbudhram I like the error better. I'll change this for everything except the /available handler. |
Yes, I'd say its overkill. In the event we do need something like this, it's simple to add. Personally I think adding test cases for when the config is set is kind of a 'low value' test case, so I did not add these; however, when I switched to using errors as @vbudhram suggested I went ahead and added some test cases for this. |
b650598 to
1a51153
Compare
1a51153 to
0a7d1dd
Compare
| }; | ||
| } catch (error) { | ||
| if (error instanceof RecoveryPhoneNotEnabled) { | ||
| // In this case we won't throw an AppError. Unlike other endpoints, |
Because
This pull request
Issue that this pull request solves
Closes: FXA-11020
Checklist
Put an
xin the boxes that applyScreenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Any other information that is important to this pull request.