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

NOISSUE - Implement errors package in Authentication service #1105

Merged
merged 6 commits into from
Apr 10, 2020

Conversation

blokovi
Copy link
Contributor

@blokovi blokovi commented Apr 8, 2020

Signed-off-by: Ivan Milošević iva@blokovi.com

What does this do?

Use mainflux errors package in Authentication service

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

Related to issues #538 and #870

List any changes that modify/break current functionality

API endpoints return error message in response body for errors (not just status response code in header)

Have you included tests for your changes?

Yes

Signed-off-by: Ivan Milošević <iva@blokovi.com>
@blokovi blokovi requested a review from a team as a code owner April 8, 2020 09:11
Signed-off-by: Ivan Milošević <iva@blokovi.com>
authn/service.go Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Apr 8, 2020

Codecov Report

Merging #1105 into master will decrease coverage by 0.17%.
The diff coverage is 56.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1105      +/-   ##
==========================================
- Coverage   77.13%   76.95%   -0.18%     
==========================================
  Files          95       95              
  Lines        6771     6775       +4     
==========================================
- Hits         5223     5214       -9     
- Misses       1211     1222      +11     
- Partials      337      339       +2     
Impacted Files Coverage Δ
authn/api/http/responses.go 100.00% <ø> (ø)
authn/postgres/key.go 91.83% <40.00%> (ø)
authn/service.go 77.50% <45.45%> (-1.99%) ⬇️
authn/api/http/transport.go 81.42% <53.33%> (-10.00%) ⬇️
authn/api/grpc/server.go 91.30% <83.33%> (-4.16%) ⬇️
authn/jwt/tokenizer.go 90.90% <100.00%> (ø)
things/service.go 88.97% <0.00%> (-1.48%) ⬇️

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 57f7ee2...33064b7. Read the comment docs.

Signed-off-by: Ivan Milošević <iva@blokovi.com>
Signed-off-by: Ivan Milošević <iva@blokovi.com>
manuio
manuio previously approved these changes Apr 8, 2020
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

authn/api/grpc/endpoint_test.go Outdated Show resolved Hide resolved
authn/api/grpc/server.go Show resolved Hide resolved
Remove nil case in encode error

Signed-off-by: Ivan Milošević <iva@blokovi.com>
drasko
drasko previously approved these changes Apr 8, 2020
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

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

LGTM

dborovcanin
dborovcanin previously approved these changes Apr 8, 2020
Signed-off-by: Ivan Milošević <iva@blokovi.com>
@blokovi blokovi dismissed stale reviews from dborovcanin and drasko via 33064b7 April 8, 2020 17:22
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

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

LGTM

@manuio manuio merged commit e438be4 into absmach:master Apr 10, 2020
@blokovi blokovi deleted the err.cont branch April 13, 2020 12:26
manuio pushed a commit that referenced this pull request Oct 12, 2020
* Implement errors package in Authn service

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* remove imported and not used fmt package

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* wrapped errors when issued new key

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* remove blank line

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Change error message in tests
Remove nil case in encode error

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* return back nil value error handling

Signed-off-by: Ivan Milošević <iva@blokovi.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.

7 participants