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

studio: Update token authorization in DVC studio client #118

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

amritghimire
Copy link
Contributor

Refactored the token authorization in DVC studio client. Introduced distinct error classes such as 'StudioAuthError', 'InvalidScopesError', 'AuthorizationExpired' for improved error handling and clearer code. The function check_token_authorization now raises an AuthorizationExpired exception if the authorization has expired instead of returning None implicitly. Further, unused imports and logging setups were removed for cleaner code. These changes are aimed to improve error debugging and the robustness of the authentication process.

Refactored the token authorization in DVC studio client. Introduced distinct error classes such as 'StudioAuthError', 'InvalidScopesError', 'AuthorizationExpired' for improved error handling and clearer code. The function `check_token_authorization` now raises an `AuthorizationExpired` exception if the authorization has expired instead of returning None implicitly. Further, unused imports and logging setups were removed for cleaner code. These changes are aimed to improve error debugging and the robustness of the authentication process.
@amritghimire amritghimire added the enhancement New feature or request label Nov 23, 2023
@amritghimire amritghimire self-assigned this Nov 23, 2023
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4b19b08) 100.00% compared to head (c773572) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #118   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          253       254    +1     
  Branches        10        11    +1     
=========================================
+ Hits           253       254    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amritghimire amritghimire merged commit f041a6b into iterative:main Nov 23, 2023
14 checks passed
@amritghimire amritghimire deleted the auth-followup branch November 23, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants