Closed MDeLuise closed 1 week ago
Attention: Patch coverage is 0%
with 15 lines
in your changes missing coverage. Please review.
Project coverage is 16.80%. Comparing base (
a94041c
) to head (fa8df3a
). Report is 27 commits behind head on develop.
Files with missing lines | Patch % | Lines |
---|---|---|
...rest/errors/KapuaDuplicateNameExceptionMapper.java | 0.00% | 9 Missing :warning: |
.../rest/model/errors/DuplicateNameExceptionInfo.java | 0.00% | 6 Missing :warning: |
🚨 Try these New Features:
Summary
This PR addresses the issue where creating an entity with a duplicate name resulted in a 500 HTTP error. The error handling has been updated to return a 409 HTTP error code, which is more appropriate for this scenario.
Changes Made
DuplicateNameException
to return a 409 HTTP error code.New Response Structure
The new response for a duplicate entity creation will be as follows:
Steps to Reproduce