BlenderKit: show token server bug detail

This commit is contained in:
Vilem Duha 2019-07-02 22:20:26 +02:00
parent d285ec6351
commit 08be12c6f8
1 changed files with 2 additions and 1 deletions

View File

@ -63,12 +63,13 @@ prev_time = 0
def check_errors(rdata):
if rdata.get('statusCode') == 401:
utils.p(rdata)
if rdata.get('detail') == 'Invalid token.':
user_preferences = bpy.context.preferences.addons['blenderkit'].preferences
if user_preferences.api_key != '':
if user_preferences.enable_oauth:
bkit_oauth.refresh_token_thread()
return False, "You've been logged out. Logging in...."
return False, rdata.get('detail')
return False, 'Missing or wrong api_key in addon preferences'
return True, ''