Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw KapuaNotFoundException if device does not exist #2735

Merged

Conversation

lorthirk
Copy link

When calling Device Events REST API, the response returns an empty list when the Device does not exist. With this PR a KapuaEntityNotFoundException will be returned instead, notifying that the Device could not be found.

Related Issue
No related issues

@lorthirk lorthirk added the REST API We hope to REST everyday label Oct 10, 2019
@lorthirk lorthirk requested a review from Coduz October 10, 2019 12:16
@lorthirk lorthirk force-pushed the fix-deviceEventsDeviceNotFound branch from 27f682a to 3affd32 Compare October 11, 2019 07:58
@codecov
Copy link

codecov bot commented Oct 11, 2019

Codecov Report

Merging #2735 into develop will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2735      +/-   ##
=============================================
+ Coverage      54.53%   54.54%   +0.01%     
- Complexity      2990     3106     +116     
=============================================
  Files           1049     1049              
  Lines          29813    29813              
  Branches        2387     2387              
=============================================
+ Hits           16259    16262       +3     
+ Misses         12435    12431       -4     
- Partials        1119     1120       +1
Impacted Files Coverage Δ Complexity Δ
...e/registry/internal/DeviceRegistryServiceImpl.java 48.43% <0%> (-3.13%) 15% <0%> (-1%)
...ransport/mqtt/pooling/PooledMqttClientFactory.java 90% <0%> (+3.33%) 6% <0%> (ø) ⬇️
...a/org/eclipse/kapua/transport/mqtt/MqttClient.java 67.94% <0%> (+5.12%) 14% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab8cccb...b95e4e1. Read the comment docs.

@lorthirk lorthirk force-pushed the fix-deviceEventsDeviceNotFound branch from 3affd32 to 2f25951 Compare October 11, 2019 08:10
Signed-off-by: Claudio Mezzasalma <claudio.mezzasalma@eurotech.com>
@lorthirk lorthirk force-pushed the fix-deviceEventsDeviceNotFound branch from 2f25951 to b95e4e1 Compare October 18, 2019 13:25
@Coduz Coduz merged commit c283d5b into eclipse-kapua:develop Oct 21, 2019
@Coduz Coduz added the Bug This is a bug or an unexpected behaviour. Fix it! label Oct 25, 2019
@lorthirk lorthirk deleted the fix-deviceEventsDeviceNotFound branch January 24, 2020 09:22
@lorthirk lorthirk restored the fix-deviceEventsDeviceNotFound branch January 24, 2020 09:22
@lorthirk lorthirk deleted the fix-deviceEventsDeviceNotFound branch January 24, 2020 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug or an unexpected behaviour. Fix it! REST API We hope to REST everyday
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants