eclipse / kapua

Eclipse Public License 2.0
222 stars 160 forks source link

:bug: [REST API] Fixed DeviceNotConnectedException mapped HTTP error code to be 400 #4047

Closed Coduz closed 2 months ago

Coduz commented 2 months ago

This PR changes the DeviceNotConnectedException REST HTTP error code from 500 to 400

Related Issue None

Description of the solution adopted Changed HTTP error code

Screenshots None

Any side note on the changes made None

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 16.66%. Comparing base (20a640d) to head (a8c73a6).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/eclipse/kapua/pull/4047/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/4047?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) ```diff @@ Coverage Diff @@ ## develop #4047 +/- ## ========================================== Coverage 16.66% 16.66% Complexity 22 22 ========================================== Files 2009 2009 Lines 52161 52161 Branches 4409 4409 ========================================== Hits 8691 8691 Misses 43068 43068 Partials 402 402 ``` | [Files](https://app.codecov.io/gh/eclipse/kapua/pull/4047?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) | Coverage Δ | | |---|---|---| | [...rest/errors/DeviceNotConnectedExceptionMapper.java](https://app.codecov.io/gh/eclipse/kapua/pull/4047?src=pr&el=tree&filepath=commons-rest%2Ferrors%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fcommons%2Frest%2Ferrors%2FDeviceNotConnectedExceptionMapper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-Y29tbW9ucy1yZXN0L2Vycm9ycy9zcmMvbWFpbi9qYXZhL29yZy9lY2xpcHNlL2thcHVhL2NvbW1vbnMvcmVzdC9lcnJvcnMvRGV2aWNlTm90Q29ubmVjdGVkRXhjZXB0aW9uTWFwcGVyLmphdmE=) | `0.00% <0.00%> (ø)` | | | [.../model/errors/DeviceNotConnectedExceptionInfo.java](https://app.codecov.io/gh/eclipse/kapua/pull/4047?src=pr&el=tree&filepath=commons-rest%2Fmodel%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fcommons%2Frest%2Fmodel%2Ferrors%2FDeviceNotConnectedExceptionInfo.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-Y29tbW9ucy1yZXN0L21vZGVsL3NyYy9tYWluL2phdmEvb3JnL2VjbGlwc2Uva2FwdWEvY29tbW9ucy9yZXN0L21vZGVsL2Vycm9ycy9EZXZpY2VOb3RDb25uZWN0ZWRFeGNlcHRpb25JbmZvLmphdmE=) | `0.00% <0.00%> (ø)` | |