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

API-35477-526-sync-pdf-client #16798

Merged
merged 15 commits into from
May 30, 2024
Merged

API-35477-526-sync-pdf-client #16798

merged 15 commits into from
May 30, 2024

Conversation

stiehlrod
Copy link
Contributor

@stiehlrod stiehlrod commented May 17, 2024

Summary

  • Adds error handling via the custom_error to the pdf_client

Related issue(s)

Testing done

  • New code is covered by unit tests
  • Describe what the old behavior was prior to the change
  • Describe the steps required to verify your changes are working as expected. Exclusively stating 'Specs run' is NOT acceptable as appropriate testing
  • If this work is behind a flipper:
    • Tests need to be written for both the flipper on and flipper off scenarios. Docs.
    • What is the testing plan for rolling out the feature?

What areas of the site does it impact?

modified:   modules/claims_api/lib/custom_error.rb
modified:   modules/claims_api/lib/pdf_generator_service/pdf_client.rb

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog or Grafana (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

@stiehlrod stiehlrod added the claimsApi modules/claims_api label May 17, 2024
@va-vfs-bot va-vfs-bot temporarily deployed to API-35477-526-sync-pdf-client/main/main May 17, 2024 21:03 Inactive
@stiehlrod stiehlrod marked this pull request as ready for review May 21, 2024 17:20
@stiehlrod stiehlrod requested a review from a team as a code owner May 21, 2024 17:20
@stiehlrod stiehlrod marked this pull request as draft May 21, 2024 17:21
@va-vfs-bot va-vfs-bot temporarily deployed to API-35477-526-sync-pdf-client/main/main May 22, 2024 17:49 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to API-35477-526-sync-pdf-client/main/main May 22, 2024 19:47 Inactive
@stiehlrod stiehlrod marked this pull request as ready for review May 22, 2024 20:30
@va-vfs-bot va-vfs-bot temporarily deployed to API-35477-526-sync-pdf-client/main/main May 22, 2024 20:34 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to API-35477-526-sync-pdf-client/main/main May 22, 2024 20:40 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to API-35477-526-sync-pdf-client/main/main May 23, 2024 01:15 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to API-35477-526-sync-pdf-client/main/main May 23, 2024 15:32 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to API-35477-526-sync-pdf-client/main/main May 23, 2024 17:17 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to API-35477-526-sync-pdf-client/main/main May 23, 2024 19:51 Inactive

def errors
errors_array = []
@errors[:errors].each do |err|
Copy link
Contributor

Choose a reason for hiding this comment

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

@stiehlrod Is there an example request you have that would help with generating an Array with a 400 included in it?

Copy link
Contributor

Choose a reason for hiding this comment

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

easiest way I've replicated it is by violating a request type by setting @request_body in the pdf_client to be nil before sending. I think there are specifics for request body items as well. Probably worth uncovering one. I thought currentVaEmployee would trigger it but? even a blank object was succeeding.

Also, weird nuance to consider. Staging was returning a 400 via HTML and sandbox was returning a 400 w/ a detailed JSON response. Was pretty interesting. Not sure if they were in the middle of an upgrade? But if you experience issues may be worth trying both staging <> sandbox proxies to be safe.

Copy link
Contributor Author

@stiehlrod stiehlrod May 29, 2024

Choose a reason for hiding this comment

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

Copy link
Contributor

@rockwellwindsor-va rockwellwindsor-va left a comment

Choose a reason for hiding this comment

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

LGTM!

@stiehlrod stiehlrod merged commit a4eb830 into master May 30, 2024
19 checks passed
@stiehlrod stiehlrod deleted the API-35477-526-sync-pdf-client branch May 30, 2024 13:05
stevenjcumming pushed a commit that referenced this pull request May 31, 2024
* Adds error handling via the custom_error to the pdf_client

* linting

* Adds to logging

* Adds common methods to service base

* Adds lighthouse bad request, and raises that in the pdf client.

* Removes change in custom error

* Removes unneeded lines in service.rb

* Addresses PR comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
claimsApi modules/claims_api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants