Releases: hmrc/pillar2-submission-api
0.71.0
Release : pillar2-submission-api 0.71.0
Last commit sha : b8e4b98
Last commit author : James Miller
Last commit time : 2025-01-29T11:08:58Z
Refactor AuthenticatedIdentifierAction Error Handling (#70)
This PR improves the error handling in the AuthenticatedIdentifierAction
by:
- Generalising Error Messages: Replaces specific authentication failure messages with more generic ones to avoid exposing internal logic.
- Updating HTTP Status Codes:
- 400 Bad Request: For client-side errors like missing or malformed headers.
- 403 Forbidden: When the client is authenticated but does not have the necessary permissions/criteria.
- 401 Unauthorized: Retained for general authentication failures.
Changes
- Updated
AuthenticatedIdentifierAction.scala
to handle different error scenarios with appropriate HTTP status codes. - Modified
Pillar2Error.scala
to include new error types (ForbiddenError
,MissingHeader
) and update existing ones. - Updated
submission.routes
to reflect the new error responses with correct status codes, messages and examples. from this subsequently generated a new openApi spec. - Revised
Pillar2ErrorHandlerSpec.scala
to test the new generic error messages. - Updated
AuthenticatedIdentifierActionSpec.scala
to cover the new error scenarios and status codes.
Issue
This PR addresses the following issues:
- Exposure of Detailed Reasons: Prevents detailed internal error messages from being exposed to clients.
- HTTP Status Mapping: Ensures that HTTP status codes accurately represent the nature of failures.
0.70.0
Release : pillar2-submission-api 0.70.0
Last commit sha : b8e4b98
Last commit author : James Miller
Last commit time : 2025-01-29T11:08:58Z
Refactor AuthenticatedIdentifierAction Error Handling (#70)
This PR improves the error handling in the AuthenticatedIdentifierAction
by:
- Generalising Error Messages: Replaces specific authentication failure messages with more generic ones to avoid exposing internal logic.
- Updating HTTP Status Codes:
- 400 Bad Request: For client-side errors like missing or malformed headers.
- 403 Forbidden: When the client is authenticated but does not have the necessary permissions/criteria.
- 401 Unauthorized: Retained for general authentication failures.
Changes
- Updated
AuthenticatedIdentifierAction.scala
to handle different error scenarios with appropriate HTTP status codes. - Modified
Pillar2Error.scala
to include new error types (ForbiddenError
,MissingHeader
) and update existing ones. - Updated
submission.routes
to reflect the new error responses with correct status codes, messages and examples. from this subsequently generated a new openApi spec. - Revised
Pillar2ErrorHandlerSpec.scala
to test the new generic error messages. - Updated
AuthenticatedIdentifierActionSpec.scala
to cover the new error scenarios and status codes.
Issue
This PR addresses the following issues:
- Exposure of Detailed Reasons: Prevents detailed internal error messages from being exposed to clients.
- HTTP Status Mapping: Ensures that HTTP status codes accurately represent the nature of failures.
0.69.0
0.68.0
0.67.0
0.66.0
Release : pillar2-submission-api 0.66.0
Last commit sha : ae8cfad
Last commit author : Kenneth Whyte
Last commit time : 2025-01-28T16:28:53Z
Pil 1608 add error code reference (#69)
- Update swagger.yml
Added description and error codes.
-
Update swagger.yml
-
Update swagger.yml
-
fix swagger.yml
-
publish changes
Co-authored-by: MoDweik [email protected]
0.65.0
Release : pillar2-submission-api 0.65.0
Last commit sha : 25c64ac
Last commit author : Kenneth Whyte
Last commit time : 2025-01-27T09:55:29Z
PIL-1608 API Documentation Updates (#67)
- Delete resources/public/api/conf/common/errors.md
errors.md file deleted
- Update overview.md
Update API and BTN naming.