-
Notifications
You must be signed in to change notification settings - Fork 57
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
Conversation
|
||
def errors | ||
errors_array = [] | ||
@errors[:errors].each do |err| |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rockwellwindsor-va use Postman: https://localhost:4451/form-526ez-pdf-generator/v1/openapi.json to find a 400 violation
modules/claims_api/spec/lib/claims_api/v2/error/lighthouse_error_handler_spec.rb
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* 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
Summary
Related issue(s)
Testing done
What areas of the site does it impact?
Acceptance criteria