400 error attempting to retrieve ehrBySubjectId api

Working with a new integration I have come across a sporadic issue that I need assistance identifying the cause.

recently updated to using ehrBase 0.30.0

The error is

{
  "error": "Bad Request",
  "message": "Could not retrieve  EHR for party:22108b3f-b1ae-4d30-ac65-169593fd5253 exception:java.lang.IllegalArgumentException: Cannot translate a null SQLException"
}

this happens when the external service uses the ehrBase API to get the EHR summary by subjectId

/ehrbase/rest/openehr/v1/ehr?subject_id=2b61ec68-a5b1-45d8-9562-b7807e6e4f0e&subject_namespace=development-domain-com

on inspection of the ehrbase party_identified table I discovered duplicate party_ref_value & party_ref_namespace

I would have believed this to be not possible and I cannot replicate this using the API with swagger endpoint in ehrBase.

There is no direct documentation suggesting there should only be one so I am interested to know if anyone else has seen this happen.

Happy to share any information details