-
Notifications
You must be signed in to change notification settings - Fork 1
[PIL-2692] - impl new account activity field #110
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
base: main
Are you sure you want to change the base?
Conversation
…fined static responses
|
|
Could you update the readme given these changes please? We need to keep on top of that on the run up to the live services handover |
dc-smith
left a comment
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.
Sorry for the barrage of comments. Most of these are questions to check if I've understood things properly, but there are a few bits I think we should tweak.
app/uk/gov/hmrc/pillar2externalteststub/controllers/AccountActivityController.scala
Show resolved
Hide resolved
app/uk/gov/hmrc/pillar2externalteststub/controllers/AccountActivityController.scala
Outdated
Show resolved
Hide resolved
| Future.failed(TestDataNotFound(pillar2Id)) | ||
| case e: DateTimeParseException => | ||
| logger.error(s"Invalid date format: ${e.getMessage}") | ||
| Future.failed(RequestCouldNotBeProcessed) |
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.
It's hard to tell from the EPID, but I don't think this should be a RequestCouldNotBeProcessed. That will result in a 422, when I'd (perhaps naively) expect a malformed date to result in a 400.
Is there any previous on ETMP's behaviour on this kind of thing? I see there's no existing error mapping to 400 beyond an empty request body or JSON, so this might be correct.
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.
This is how we also handle it in the obligationsandsubmissions controller so I got that behaviour from there
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.
Right, if that endpoint cleared QA for matching with the real thing that's fine by me, thanks.
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 genuinely don't know which one is correct, but hmrc/pillar2-stubs#103 has a bad date format as a 400 🤷
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.
@joshua-lamptey please see hmrc/pillar2-stubs#103 (comment). We should probably have this return a 400 to match the static stub (and hopefully the real thing).
app/uk/gov/hmrc/pillar2externalteststub/helpers/AccountActivityDataResponses.scala
Outdated
Show resolved
Hide resolved
app/uk/gov/hmrc/pillar2externalteststub/helpers/AccountActivityDataResponses.scala
Outdated
Show resolved
Hide resolved
app/uk/gov/hmrc/pillar2externalteststub/helpers/AccountActivityDataResponses.scala
Outdated
Show resolved
Hide resolved
app/uk/gov/hmrc/pillar2externalteststub/helpers/AccountActivityDataResponses.scala
Show resolved
Hide resolved
app/uk/gov/hmrc/pillar2externalteststub/models/organisation/TestOrganisation.scala
Show resolved
Hide resolved
test/uk/gov/hmrc/pillar2externalteststub/services/AccountActivityServiceSpec.scala
Outdated
Show resolved
Hide resolved
dc-smith
left a comment
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
|
(Though |
…est by using Clock
| - `fromDate`: Start date (YYYY-MM-DD) | ||
| - `toDate`: End date (YYYY-MM-DD) | ||
|
|
||
| ### 8. Account Activity |
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.
Apologies, I know i'm harping on about the readme but could we add the different scenarios here, and a description on how to set them
This ticket introduces a new testData json object which will allow users of the external test stub to create and amend orgs with set Account Activity scenarios that will return static responses based on the field provided.
Key Changes: