When GetByName encounters more than one record with the same pretty URL name, it returns a status 500 error. Returning the first record, and perhaps logging a warning, would be a better user experience.
ESTIMATE TBD
What's the expected change?
Return the first available record.
What's the current functionality?
Throw a status 500 message.
What's the updated acceptance criteria?
Additional details / screenshot
Change the test to return response.Documents.First() when response.Total >= 1.
Issue description
When
GetByName
encounters more than one record with the same pretty URL name, it returns a status 500 error. Returning the first record, and perhaps logging a warning, would be a better user experience.What's the expected change?
What's the current functionality?
What's the updated acceptance criteria?
Additional details / screenshot
response.Documents.First()
whenresponse.Total >= 1
.https://github.com/NCIOCPL/glossary-api/blob/develop/src/NCI.OCPL.Api.Glossary/Services/ESTermsQueryService.cs#L157-L172
Related Tickets