Skip to content

Store bounce details on delivery#2082

Merged
stephencdaly merged 4 commits into
mainfrom
store-bounce-details-on-submission
May 7, 2026
Merged

Store bounce details on delivery#2082
stephencdaly merged 4 commits into
mainfrom
store-bounce-details-on-submission

Conversation

@stephencdaly
Copy link
Copy Markdown
Contributor

What problem does this pull request solve?

Trello card: https://trello.com/c/CsEqMtDL

We want to send a daily notification of any bounced submission emails to the admins for a form. In the notification email, we want to include different content depending on whether we can identify the bounce as a hard or soft bounce, with the scope to be more specific in the future for different bounce types.

Add a failure_details jsonb column to the deliveries table to store additional failure details when a delivery fails.

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

We want to send a daily notification of any bounced submission emails
to the admins for a form. In the notification email, we want to
include different content depending on whether we can identify the
bounce as a hard or soft bounce, with the scope to be more specific in
the future for different bounce types.

Add a `failure_details` jsonb column to the deliveries table to store
additional failure details when a delivery fails.
@stephencdaly stephencdaly force-pushed the store-bounce-details-on-submission branch 2 times, most recently from 1400218 to 2f7d1ec Compare May 6, 2026 15:43
@stephencdaly stephencdaly marked this pull request as ready for review May 6, 2026 15:47
When handling a bounce, store the JSON blob continaing detailed
information about the bounce on the delivery. This will allows us to
inspect this information when sending daily notification emails about
bounces to form admins.

Update the specs to remove the additional "when there is a bounce
object with detailed information" contexts and instead include the
assertions that we log the bounce details in the existing contexts.
@stephencdaly stephencdaly force-pushed the store-bounce-details-on-submission branch from 2f7d1ec to 40f6f14 Compare May 6, 2026 16:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2082.submit.review.forms.service.gov.uk/

It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

Copy link
Copy Markdown
Contributor

@lfdebrux lfdebrux left a comment

Choose a reason for hiding this comment

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

Changes look good to me

@stephencdaly stephencdaly added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit 4601688 May 7, 2026
3 checks passed
@stephencdaly stephencdaly deleted the store-bounce-details-on-submission branch May 7, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants