Handling more cases of login/credentials issues
This commit is contained in:
parent
ba4c951d32
commit
be46b9cf81
@ -348,7 +348,7 @@ class BlenderCloudBrowser(bpy.types.Operator):
|
||||
self._show_subscribe_screen()
|
||||
return
|
||||
except pillar.UserNotLoggedInError:
|
||||
self.error('User not logged in on Blender ID.')
|
||||
self.log.error('User not logged in on Blender ID.')
|
||||
else:
|
||||
self.log.info('Credentials refreshed and ok, browsing assets.')
|
||||
await self.async_download_previews()
|
||||
|
@ -179,7 +179,7 @@ async def check_pillar_credentials():
|
||||
|
||||
try:
|
||||
db_user = await pillar_call(pillarsdk.User.find, pillar_user_id)
|
||||
except pillarsdk.UnauthorizedAccess:
|
||||
except (pillarsdk.UnauthorizedAccess, pillarsdk.ResourceNotFound):
|
||||
raise CredentialsNotSyncedError()
|
||||
|
||||
roles = db_user.roles
|
||||
@ -208,7 +208,11 @@ async def refresh_pillar_credentials():
|
||||
|
||||
# Create a subclient token and send it to Pillar.
|
||||
# May raise a blender_id.BlenderIdCommError
|
||||
try:
|
||||
blender_id.create_subclient_token(SUBCLIENT_ID, pillar_endpoint)
|
||||
except blender_id.communication.BlenderIdCommError as ex:
|
||||
log.warning("Unable to create authentication token: %s", ex)
|
||||
raise CredentialsNotSyncedError()
|
||||
|
||||
# Test the new URL
|
||||
_pillar_api = None
|
||||
|
Reference in New Issue
Block a user