Skip to content

LG-14464: Show warning CTA on ThreatMetrix API exception#11459

Merged
lmgeorge merged 3 commits intomainfrom
lmgeorge/LG-14464
Nov 13, 2024
Merged

LG-14464: Show warning CTA on ThreatMetrix API exception#11459
lmgeorge merged 3 commits intomainfrom
lmgeorge/LG-14464

Conversation

@lmgeorge
Copy link
Copy Markdown
Contributor

@lmgeorge lmgeorge commented Nov 5, 2024

Why

  • The "internal error" view displayed during IdV is a last resort view. Prior to this change, this view was also shown when we received a ThreatMetrix API response that included an exception message.

  • Showing the internal error view for an unknown exception raised by the ThreatMetrix API is not useful for the subject undergoing proofing and it obfuscates the action that can be taken by either the proofing subject or the support agent investigating the identity resolution errors.

How

  • Added a logic branch to the routing handling of Idv::VerifyInfoConcern#idv_failure that still preferences the known actionable error cases (i.e., ssn_failure, rate_limiter, etc.), which is eventually called by both Idv::VerifyInfoController and Idv::InPerson::VerifyInfoController

    1. The first new case handles the ThreatMetrix API exception
    2. The second new case handles when there is no exception, but the resolution check (e.g., InstantVerify) didn't pass.
  • Updated the Idv::VerifyInfoController spec to examine the expected routing and the expected shape of the ThreatMetrix API exception response. As the exception message is an arbitrary unstructured String, we do not test for specific values and instead ensure that the shape of the response in our analytics meets a minimum conformance in structure and value types.

Notes

  • This is a difficult to replicate error as it relies on blackbox behavior exhibited by our vendor APIs.

changelog: Internal, IdV resolution, Error routing for vendor API exceptions

🎫 Ticket

Link to the relevant ticket:
LG-14464

@lmgeorge lmgeorge added status - ready for review ruby Pull requests that update Ruby code labels Nov 5, 2024
@lmgeorge lmgeorge requested review from a team, jmhooper and matthinz November 5, 2024 23:34
@lmgeorge lmgeorge self-assigned this Nov 5, 2024
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A/N: I've only ever found 2 variants of the actual exception message sent to us, but didn't think a stricter match was really necessary as we don't inspect the exception message at all.

@lmgeorge lmgeorge changed the title LG-14464: Show warning CTA on TMX API exception LG-14464: Show warning CTA on ThreatMetrix API exception Nov 5, 2024
Copy link
Copy Markdown
Contributor

@n1zyy n1zyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't realized how complex this logic was! I like the pattern of a thorough PR description here. Looks good to me!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the ResultAdjudicator directly here is a Good Idea

**Why**

* The "internal error" view displayed during IdV is a last resort
  view. Prior to this change, this view was also shown when we received
  a ThreatMetrix API response that included an exception message.

* Showing the internal error view for an unknown exception raised by
  the ThreatMetrix API is not useful for the subject undergoing proofing
  and it obfuscates the action that can be taken by either the proofing
  subject or the support agent investigating the identity resolution
  errors.

**How**

* Added a logic branch to the routing handling of
  `Idv::VerifyInfoConcern#idv_failure` that still preferences the
  actionable error views (i.e., ssn_failure, rate_limiter, etc.), which
  is eventually called by both Idv::VerifyInfoController and
  Idv::InPerson::VerifyInfoController

* Updated the Idv::VerifyInfoController spec to examine the expected
  routing and the expected shape of the ThreatMetrix API exception
  response. As the exception message is an arbitrary unstructured String,
  we do not test for specific values and instead ensure that the *shape*
  of the response in our analytics meets a minimum conformance in
  structure and value types.

**Notes**

* This is a difficult to replicate error as it relies on blackbox
  behavior exhibited by our vendor APIs.

changelog: Internal, IdV resolution, Error routing for vendor API exceptions
@lmgeorge lmgeorge merged commit 9f9aaf8 into main Nov 13, 2024
@lmgeorge lmgeorge deleted the lmgeorge/LG-14464 branch November 13, 2024 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ruby Pull requests that update Ruby code status - ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants