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

Handle failed request to system supplementary #2611

Merged
merged 3 commits into from
Aug 16, 2024

Conversation

Cruikshanks
Copy link
Member

@Cruikshanks Cruikshanks commented Aug 16, 2024

https://eaflood.atlassian.net/browse/WATER-4622

Part of the work to flag licences for SROC 2PT supplementary billing

We recently added support for sending a request to the water-abstraction-system to let it know a new charge version had been added. The intent is for water-abstraction-system to determine if the licence needs to be flagged for SROC two-part tariff supplementary billing because of this.

The only problem is we ain't built the endpoint yet! 🤦

We've just realised we've broken the create charge version journey because the request is getting a failed response (404). We're not far away from adding the endpoint. But even so, we don't want a failure to flag the licence to cause the charge version record to get messed up.

This change adds a try/catch around the request so we can log and swallow any failures and let the legacy code continue doing its job.

Screenshot 2024-08-16 at 09 18 03

https://eaflood.atlassian.net/browse/WATER-4622

> Part of the work to flag licences for SROC 2PT supplementary billing

We recently added support for sending a request to the [water-abstraction-system](https://github.com/DEFRA/water-abstraction-system) to let it know a new charge version had been added. The intent is that **water-abstraction-system** will then determine if the licence needs to be flagged for SROC two-part tariff supplementary billing because of this.

Only problem is, we ain't built the endpoint yet! 🤦

We've just realised we've broken the create charge version journey because the request is getting a failed response (404). We're not far away from adding the endpoint. But even so, we don't want a failure to flag the licence to cause the charge version record to get messed up.

So, this change adds a `try/catch` around the request so we can log and swallow any failures and let the legacy code carry on with what it was doing.
@Cruikshanks Cruikshanks added the housekeeping Refactoring, tidying up or other work which supports the project label Aug 16, 2024
@Cruikshanks Cruikshanks self-assigned this Aug 16, 2024
@Cruikshanks Cruikshanks marked this pull request as ready for review August 16, 2024 08:25
Copy link
Contributor

@Jozzey Jozzey left a comment

Choose a reason for hiding this comment

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

@Cruikshanks Cruikshanks merged commit 3d7f14a into main Aug 16, 2024
4 checks passed
@Cruikshanks Cruikshanks deleted the handle-failed-request-to-supplementary-flag branch August 16, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Refactoring, tidying up or other work which supports the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants