department-of-veterans-affairs/vets-website

View on GitHub
src/applications/disability-benefits/686c-674/documentation/686c.md

Summary

Maintainability
Test Coverage
# Async and Error Handling for 686c

- Raises Invalid686cClaim error if claim data is not valid. Validity is defined as follows:
  - SSN can’t be blank
  - Dependent application can’t be blank
  - Veteran address can’t be blank
- Submit 686c (BGS::Form686c#submit)
  - BGS::Service methods called: #create_proc, #create_proc_form, #create_note, #update_proc
  - #create_note has a rescue block that raises a 'BGS_686c_SERVICE_403’ backend exception and re-thrown for SubmitForm686cJob to catch, but doesn’t look like any notification is sent to the user at this point.
- If 686c job succeeds, queue up 674 job
  - Deletes in progress form
  - Async BGS::SubmitForm674Job
  - Async send VANotify::ConfirmationEmail to user
- If any exception is caught
  - revert in progress form data
  - DependentsApplicationFailureMailer#deliver_now to user