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

MF-579 Things & Channels returns 404 when not found or ID is malformed, not 500 #633

Merged
merged 4 commits into from Mar 6, 2019
Merged

Conversation

ghost
Copy link

@ghost ghost commented Mar 5, 2019

Signed-off-by: Vladimir Starcevic vstarcevic@gmail.com

What does this do?

Retrieving things or channels by Id, returns 404 when not found or id is malformed, not 500

Which issue(s) does this PR fix/relate to?

Resolves #579

List any changes that modify/break current functionality

NA

Have you included tests for your changes?

Yes

Did you document any new/modified functionality?

NA

Notes

Signed-off-by: Vladimir Starcevic <vstarcevic@gmail.com>
@ghost ghost changed the title Things returns 404 when not found, not 500 MF-579 Things returns 404 when not found, not 500 Mar 5, 2019
@manuio
Copy link
Contributor

manuio commented Mar 5, 2019

@vstarcevic this is the expected behavior. 404 is not found 500 is Internal server error

.gitignore Outdated Show resolved Hide resolved
things/postgres/things.go Outdated Show resolved Hide resolved
manuio
manuio previously approved these changes Mar 5, 2019
Copy link
Contributor

@manuio manuio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

things/postgres/things.go Outdated Show resolved Hide resolved
Signed-off-by: Vladimir Starcevic <vstarcevic@gmail.com>
@codecov-io
Copy link

codecov-io commented Mar 5, 2019

Codecov Report

Merging #633 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #633      +/-   ##
==========================================
- Coverage   86.72%   86.67%   -0.05%     
==========================================
  Files          62       62              
  Lines        3623     3625       +2     
==========================================
  Hits         3142     3142              
- Misses        327      329       +2     
  Partials      154      154
Impacted Files Coverage Δ
things/postgres/channels.go 81.08% <100%> (+0.12%) ⬆️
things/postgres/things.go 82.5% <100%> (+0.14%) ⬆️
things/service.go 92.85% <0%> (-1.3%) ⬇️

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 3300814...1d21038. Read the comment docs.

manuio
manuio previously approved these changes Mar 5, 2019
@ghost ghost added the work-in-progress label Mar 6, 2019
…rmed not 500

Signed-off-by: Vladimir Starcevic <vstarcevic@gmail.com>
@ghost ghost removed the work-in-progress label Mar 6, 2019
…d, not 500

Signed-off-by: Vladimir Starcevic <vstarcevic@gmail.com>
@ghost ghost changed the title MF-579 Things returns 404 when not found, not 500 MF-579 Things & Channels returns 404 when not found or ID is malformed, not 500 Mar 6, 2019
Copy link
Contributor

@anovakovic01 anovakovic01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nmarcetic nmarcetic merged commit dbd8f9b into absmach:master Mar 6, 2019
@ghost ghost deleted the MF-579 branch March 6, 2019 13:12
davide83 pushed a commit to davide83/mainflux that referenced this pull request May 13, 2019
…d, not 500 (absmach#633)

* Things returns 404 when not found, not 500

Signed-off-by: Vladimir Starcevic <vstarcevic@gmail.com>

* MF-579 Things returns 404 when not found or thingid is in invalid format

Signed-off-by: Vladimir Starcevic <vstarcevic@gmail.com>

* MF-579 Things and channels returns 404 when not found, or ID is malformed not 500

Signed-off-by: Vladimir Starcevic <vstarcevic@gmail.com>

* MF-579 Things & Channels returns 404 when not found or ID is malformed, not 500

Signed-off-by: Vladimir Starcevic <vstarcevic@gmail.com>
manuio pushed a commit that referenced this pull request Oct 12, 2020
…d, not 500 (#633)

* Things returns 404 when not found, not 500

Signed-off-by: Vladimir Starcevic <vstarcevic@gmail.com>

* MF-579 Things returns 404 when not found or thingid is in invalid format

Signed-off-by: Vladimir Starcevic <vstarcevic@gmail.com>

* MF-579 Things and channels returns 404 when not found, or ID is malformed not 500

Signed-off-by: Vladimir Starcevic <vstarcevic@gmail.com>

* MF-579 Things & Channels returns 404 when not found or ID is malformed, not 500

Signed-off-by: Vladimir Starcevic <vstarcevic@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid ID format results in Internal Server Error
6 participants