Skip to content

Conversation

@steph-torres-nhs
Copy link
Contributor

@steph-torres-nhs steph-torres-nhs commented Jan 2, 2026

Overview

Jira ticket: PRMP-1083

Description

As a Developer, I want to replace duplicated and overly specific exception classes with a set of generic, reusable errors So that the codebase is easier to maintain, the API responses are consistent, and we reduce unnecessary boilerplate code.

Context

Review Feature tidy up

Checklist

Tasks for all changes:

  • 1. I have linked this PR to its Jira ticket.
  • 2. I have run git pre-commits. (WIP)
  • 3. I have added and/or updated relevant tests.
  • [ ] 4. I have updated relevant documentation.
  • 5. I have considered the cross-team impact (and have PR approval from both Core & Demographics if necessary).
  • 6. I have successfully deployed this change to a sandbox and witnessed unit and e2e tests passing:

NogaNHS
NogaNHS previously approved these changes Jan 5, 2026
}

DocumentReviewDB = {
"err_code": "UDR_5001",
Copy link
Contributor

@kamenbachvarov-nhs kamenbachvarov-nhs Jan 13, 2026

Choose a reason for hiding this comment

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

I think we created UDR error code for update document reference errors, should you use DRV here ( if it stands for document review) ? and on line 540

Comment on lines 514 to 518
UpdateDocStatusUnavailable = {
"err_code": "DRV_4003",
"err_code": "UDR_4001",
"message": "This Document is not available for review update",
"fhir_coding": FhirIssueCoding.FORBIDDEN,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be DocumentReviewStatusUnavailable?
or something that starts with DocumentReview, so it is consistent with the other errors in this group?

Comment on lines 549 to 552
SearchDocumentInvalidQuerystring = {
"err_code": "SDR_4002",
"message": "Invalid query string passed",
}
Copy link
Contributor

Choose a reason for hiding this comment

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

SearchDocumentInvalidQueryString I suppose

@github-actions
Copy link

Code security issues found

View full details here.

@sonarqubecloud
Copy link

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.

3 participants