This repository was archived by the owner on Aug 22, 2023. It is now read-only.
storage code error #64
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Link to issue card: Raise CRIPT exception for invalid Globus tokens
Changes
A custom Exception was written and added to src/cript/storage_clients/exceptions.py that can be raised whenever a user is trying to connect to a storage client (Globus, S3) and gives an invalid authentication code. The error here is more helpful and understandable
Code
InvalidAuthCode in storage_clients/exceptions.py:
The exception was implemented in src/cript/storage_clients/globus.py within a try except block
Limitations
I have implemented the Exception for Globus storage only.
Before
When a user would give an invalid authentication code here is the error they would get in the terminal
After
With the new Exception here is the error the users would get when they input an invalid authentication code for Globus
Tests
I manually tested this with the Excel Uploader because that uses the SDK under the hood. I installed the SDK in edit mode
pip install -e ..\cript-SDK\and when I got to the Globus Authentication code screen I would enter an invalid authentication code and get the errors in the terminal