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

fix: handle error when jwt token could not be retrieved #3119

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

Ruadhri17
Copy link
Contributor

Proposed changes

This PR replace unwrap() with anyhow error handling when c8y_auth_proxy is trying to retrive JWT token.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 68.75000% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/extensions/c8y_auth_proxy/src/server.rs 68.00% 4 Missing and 4 partials ⚠️
crates/extensions/c8y_auth_proxy/src/tokens.rs 71.42% 0 Missing and 2 partials ⚠️
Additional details and impacted files

📢 Thoughts on this report? Let us know!

Copy link
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
504 0 2 504 100 1h24m33.94476s

Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

Approved

@reubenmiller reubenmiller changed the title fix: handle error when jwt token could not be retrived fix: handle error when jwt token could not be retrieved Sep 10, 2024
@reubenmiller reubenmiller added the theme:c8y Theme: Cumulocity related topics label Sep 10, 2024
Copy link
Member

@rina23q rina23q left a comment

Choose a reason for hiding this comment

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

LGTM

@Ruadhri17 Ruadhri17 added this pull request to the merge queue Sep 10, 2024
github-merge-queue bot pushed a commit that referenced this pull request Sep 10, 2024
fix: handle error when jwt token could not be retrieved
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 10, 2024
@reubenmiller reubenmiller added this pull request to the merge queue Sep 10, 2024
Merged via the queue into thin-edge:main with commit ea6adf6 Sep 10, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working theme:c8y Theme: Cumulocity related topics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants