Eclipse Kura™ is a versatile framework to supercharge your edge devices, streamlining the process of configuring your gateway, connecting sensors, and IoT devices to seamlessly collect, process, and send data to the cloud.
This PR modifies the response status code and error message in case of malformed request body for Identity/Permission REST APIs of IdentityV2.
When the request doesn't contain the name key or it's wrong (eg: nam), the corresponding DTO (Identity or Permission DTO) will have a null value as name. On Kura side, null/empty checks were missing, so the IdentityService was trying to remove something that it could not found, responding with a 404 status code with message Identity not found.
After this change, the null/empty checks are added: if the name value is null (missing or wrong name field) or empty, a 400 status code is returned with an appropriate message.
This PR modifies the response status code and error message in case of malformed request body for Identity/Permission REST APIs of IdentityV2.
When the request doesn't contain the
name
key or it's wrong (eg:nam
), the corresponding DTO (Identity or Permission DTO) will have a null value as name. On Kura side, null/empty checks were missing, so the IdentityService was trying to remove something that it could not found, responding with a 404 status code with messageIdentity not found
.After this change, the null/empty checks are added: if the
name
value is null (missing or wrongname
field) or empty, a 400 status code is returned with an appropriate message.Related Issue:
Description of the solution adopted:
Screenshots:
Manual Tests:
Any side note on the changes made: