-
Notifications
You must be signed in to change notification settings - Fork 19
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
Retry getting a rating profile on BGS::ShareError #15316
Conversation
Code Climate has analyzed commit a6ca483 and detected 0 issues on this pull request. View more on Code Climate. |
@@ -65,9 +69,24 @@ def fetch_rating_profile | |||
) | |||
rescue Savon::Error | |||
{} | |||
rescue BGS::ShareError |
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.
I decided to rescue the generic ShareError instead of the specific one originally listed in the AC because I figure anytime we get the ShareError, it's worth trying the other service as a backup.
start_date: profile_date, | ||
end_date: profile_date |
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.
Should the start and end dates be the same?
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.
Yeah, with the regular service we can fetch a specific rating profile using the veteran's participant ID and profile date.
With the "back" service, we can fetch a range by date instead of a specific one. So this limits the results, and then another (just in case) matching is done using the profile date comparison method which includes the timestamp.
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.
Left some comments. I'll let @tomas-nava review for approval.
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.
approve!
It looks solid to me, but is there a way we can test in UAT or prod before making it widely available, since it changes the way we interact with BGS for a small number of cases?
Okay, tested in UAT (not the ShareError specific case, but just that regular behavior is not breaking. |
connects #15259
Description
Catches BGS::ShareError when fetching a rating profile, and re-tries fetching the rating profile with the other service.
Acceptance Criteria
with a similar message to aboveTesting Plan