eclipse / kapua

Eclipse Public License 2.0
222 stars 160 forks source link

:bug: [Accounts] Current account update was not checking for not null organisation name and email #4077

Closed dseurotech closed 1 month ago

dseurotech commented 1 month ago

This PR fixes the following bug:

Invoke the PUT v1/account endpoint with the payload: { "optlock": 32, "organization": { "expirationDate": "2026-02-01T22:59_59.999Z" } } An error 500 is returned: { "type": "exceptionInfo", "httpErrorCode": 500, "message": "An internal error occurred: Error during Persistence Operation.", "kapuaErrorCode": "INTERNAL_ERROR" } Expected behaviour: An error of class 400 should be returned.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 16.81%. Comparing base (e2fd1dc) to head (09be6ec).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/eclipse/kapua/pull/4077/graphs/tree.svg?width=650&height=150&src=pr&token=1P4N4CApH8&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse)](https://app.codecov.io/gh/eclipse/kapua/pull/4077?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) ```diff @@ Coverage Diff @@ ## develop #4077 +/- ## ============================================= - Coverage 16.81% 16.81% -0.01% Complexity 22 22 ============================================= Files 2010 2011 +1 Lines 52256 52261 +5 Branches 4401 4401 ============================================= Hits 8788 8788 - Misses 43071 43076 +5 Partials 397 397 ``` | [Files](https://app.codecov.io/gh/eclipse/kapua/pull/4077?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) | Coverage Δ | | |---|---|---| | [.../kapua/service/account/internal/AccountMapper.java](https://app.codecov.io/gh/eclipse/kapua/pull/4077?src=pr&el=tree&filepath=service%2Faccount%2Finternal%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Faccount%2Finternal%2FAccountMapper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9hY2NvdW50L2ludGVybmFsL3NyYy9tYWluL2phdmEvb3JnL2VjbGlwc2Uva2FwdWEvc2VydmljZS9hY2NvdW50L2ludGVybmFsL0FjY291bnRNYXBwZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | | | [...a/service/account/internal/AccountServiceImpl.java](https://app.codecov.io/gh/eclipse/kapua/pull/4077?src=pr&el=tree&filepath=service%2Faccount%2Finternal%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fservice%2Faccount%2Finternal%2FAccountServiceImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-c2VydmljZS9hY2NvdW50L2ludGVybmFsL3NyYy9tYWluL2phdmEvb3JnL2VjbGlwc2Uva2FwdWEvc2VydmljZS9hY2NvdW50L2ludGVybmFsL0FjY291bnRTZXJ2aWNlSW1wbC5qYXZh) | `3.26% <0.00%> (-0.09%)` | :arrow_down: |