-
Notifications
You must be signed in to change notification settings - Fork 26
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
[FSTORE-1645] Catch HSML initialization permission-related errors in login #440
base: main
Are you sure you want to change the base?
Conversation
except RestAPIError as e: | ||
if e.response.error_code == 403: | ||
print( | ||
"You lack permission to initialize model serving. Machine learning functionality will be not available." |
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.
"You lack permission to initialize model serving. Machine learning functionality will be not available." | |
"Api key does not include "SERVING" scope, related functionality will be disabled." |
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.
This message may be misleading, since the code catches all 403. I'll think about this and hopefully come up with a better solution.
print( | ||
"You lack permission to initialize model serving. Machine learning functionality will be not available." | ||
) | ||
print("The permission-related exception is:", e) |
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.
Can you use a debug/exception logger for the second print instead?
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.
I printed it for the same reason as is explained above. I will change it to use the debug logger.
JIRA Issue: FSTORE-1645