-
Notifications
You must be signed in to change notification settings - Fork 8
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
Adding more informative error messaging due to potential JWT and Clerk data discrepancy #144
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the initiative, @Andrewq11 ! That is a nice quality of life improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again, @Andrewq11 ! Throwing custom exceptions in Python is not something I've really done before, so I'm learning with you here. I feel like the current approach is not very Pythonic and did some further suggestions that may help in that regard. Curious to hear what you think! Appreciate your patience.
I'm curious how other libs do this, e.g. numpy. No need to overthink it yet, but maybe there is some inspiration to be found there once we want more advanced functionality.
@Andrewq11 With me being OOO, the time difference and the fast approaching deadline, I decide to make a PR into your branch to make my suggestions very explicit: #153. I won't be available after 14:00 CET (08:00 EST), so you have my blessing to accept or reject these suggestions as you see fit and to merge this PR afterwards! 😉 |
* Suggestion that came up during PR feedback * Update raise statements * Updated parent class of PolarisUnauthorizedError * Updated error message * Updated error message * Pass response in the PolarisFS * small changes * moving mixins to folder --------- Co-authored-by: Andrew Quirke <andrewquirke99@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Andrewq11! I added some minor comments/suggestions.
Changelogs
Due to the potential discrepancy between claims in JWTs issued from the Hub and the true data in Clerk, we want to provide users with a more informative error message in the event of forbidden errors (for upload) and not found errors (for downloads). More specifically, we would like to suggest to the user to retry logging in to get a fresh JWT with up-to-date claims from Clerk.
Checklist:
Add tests to cover the fixed bug(s) or the newly introduced feature(s) (if appropriate).feature
,fix
,chore
,documentation
ortest
(or ask a maintainer to do it for you).discussion related to that PR