Skip to content

0.487.0

Choose a tag to compare

@hmrc-web-operations hmrc-web-operations released this 27 Feb 11:15
· 14 commits to main since this release
c7a11fb

Release : pillar2-frontend 0.487.0

Last commit sha : c7a11fb
Last commit author : James Miller
Last commit time : 2026-02-27T10:58:28Z

PIL-2624 - Update BTN to handle raw response from ETMP (#639)

This PR implements the frontend portion of the BTN Audit refactoring
(PIL-2624).

Key Changes:

  1. Raw Response Handling: The BTNConnector and BTNService now
    return the raw HttpResponse from the pillar2 backend, which is
    acting as a transparent proxy.
  2. Enhanced Auditing: The BtnSubmissionService has been updated to
    capture the exact status code and response body from the downstream ETMP
    service.
  3. Audit Model Updates: Added ApiResponseData.fromHttpResponse to
    correctly parse raw responses for audit events.
  4. Error Handling: Logic for handling success (201) vs failure
    (non-201) has been moved here from the backend.
  5. Test Updates: Comprehensive updates to BTNConnectorSpec,
    BTNServiceSpec, BtnSubmissionServiceSpec, and
    CheckYourAnswersControllerSpec to mock and verify HttpResponse
    objects and ensure compilation success.

Motivation:
To improve visibility into downstream errors and ensure the audit trail
accurately reflects the raw response from ETMP.