Skip to content

Lg 7738 - mock errors for inherited proofing mock proofer#7243

Merged
holytoastr merged 4 commits intomainfrom
LG-7738-mock-errors-for-mock-proofer
Oct 31, 2022
Merged

Lg 7738 - mock errors for inherited proofing mock proofer#7243
holytoastr merged 4 commits intomainfrom
LG-7738-mock-errors-for-mock-proofer

Conversation

@holytoastr
Copy link
Contributor

🎫 Ticket

LG-7738

🛠 Summary of changes

Returns an error in the Inherited Proofing mock proofer when the incorrect auth code is provided

Why:
So we can test the error paths in non-production environments

changelog: Internal, Inherited Proofing, Mock errors for mock proofer
@holytoastr holytoastr added the inherited proofing Pull Requests for the Inherited Proofing feature label Oct 28, 2022
@holytoastr holytoastr self-assigned this Oct 28, 2022
@holytoastr
Copy link
Contributor Author

I posted this in another comment, but just for visibility:

Just for bigger picture context, since the auth code is provided by the VA when the user is sent to us we don't have a place where we would input the code the way you would with a phone number. In the end, I am envisioning a response like below once we have more than 2 auth_codes to work with. However, since we're agile, we're keeping it simple for now with a tertiary operator and will iterate as new codes are provided to us by the devs working on the VA api.

PAYLOAD_HASH = {...}
ERROR_HASH_A = {...}
ERROR_HASH_B = {...}
GENERIC_ERROR_HASH = {...}
PAYLOAD_HASHES = {
  Idv::InheritedProofing::Va::Mocks::Service::VALID_AUTH_CODE => PAYLOAD_HASH,
  'error_a_auth_code' => ERROR_HASH_A,
  'error_b_auth_code' => ERROR_HASH_B,
}

PAYLOAD_HASHES[auth_code] || GENERIC_ERROR_HASH

Hopefully you find that helpful and can approve this PR to help move it along

@holytoastr holytoastr merged commit 52fb2b5 into main Oct 31, 2022
@holytoastr holytoastr deleted the LG-7738-mock-errors-for-mock-proofer branch October 31, 2022 17:13
@aduth aduth mentioned this pull request Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inherited proofing Pull Requests for the Inherited Proofing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants