Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LG-15456: Source AAMVA requested attributes from request #11826

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lmgeorge
Copy link
Contributor

Why
Requested attributes are for our internal analytics to ensure that the fields sent match any errors we get back. Prior to this change, the requested attributes were sourced from the response body, which meant that regardless of what attributes were requested, we would only know about the attributes that were "seen" and processed by DLDV.

Without knowing which fields were actually requested, troubleshooting certain errors is challenging as there would be a mismatch between what was actually sent and how AAMVA processed the request.

How

  • Added the logic for generating requested attributes to Proofing::Aamva::Request::VerificationRequest as part of creating the request body.
  • Instead of Set, we use a Hash. Attributes that have a value are coded as 1. Core attributes (e.g., birthdate), which are always requested, are coded as 0 when blank.
  • Added a constant for storing a map of attributes to XPaths to reduce duplication.
  • Updated the Proofing::Aamva::Proofer to build the request and "normalize" the requested attributes Hash per previous business logic.

Future work should consider making a subclass that solely handles building the request body.

changelog: Bug Fixes, Analytics, Log correct DLDV requested attributes

🎫 Ticket

Link to the relevant ticket:
LG-15456

**Why**
Requested attributes are for our internal analytics to ensure that the
fields sent match any errors we get back. Prior to this change, the
requested attributes were sourced from the response body, which meant
that regardless of what attributes were requested, we would only know
about the attributes that were "seen" and processed by DLDV.

Without knowing which fields were actually requested, troubleshooting
certain errors is challenging as there would be a mismatch between what
was actually sent and how AAMVA processed the request.

**How**
* Added the logic for generating requested attributes to
  `Proofing::Aamva::Request::VerificationRequest` as part of creating
  the request body.
* Instead of Set, we use a Hash. Attributes that have a value are coded as 1.
  Core attributes (e.g., birthdate), which are always requested, are
  coded as 0 when blank.
* Added a constant for storing a map of attributes to XPaths to reduce
  duplication.
* Updated the `Proofing::Aamva::Proofer` to build the request and
  "normalize" the requested attributes Hash per previous business logic.

Future work should consider making a subclass that solely handles
building the request body.

changelog: Bug Fixes, Analytics, Log correct DLDV requested attributes
@lmgeorge lmgeorge added type - bug ruby Pull requests that update Ruby code area - analytics labels Jan 30, 2025
@lmgeorge lmgeorge requested review from a team and matthinz January 30, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area - analytics ruby Pull requests that update Ruby code type - bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant