Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
cb696be7
Unverified
Commit
cb696be7
authored
Jan 20, 2025
by
Jakob Görgen
Browse files
symphony/client: in case of 401 + 403 better error message auth
parent
d62a440c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
symphony/client/simbricks/client/auth.py
symphony/client/simbricks/client/auth.py
+6
-4
No files found.
symphony/client/simbricks/client/auth.py
View file @
cb696be7
...
...
@@ -178,11 +178,13 @@ class TokenClient:
"ticket"
:
ticket
,
},
)
as
resp
:
resp
.
raise_for_status
()
# TODO: handel gracefully
if
resp
.
status
in
[
401
,
403
]:
json_resp
=
await
resp
.
json
()
if
"error"
in
json_resp
:
raise
Exception
(
f
"error refreshing token:
{
json_resp
}
"
)
else
:
resp
.
raise_for_status
()
json_resp
=
await
resp
.
json
()
token
=
self
.
_create_token_from_resp
(
json_obj
=
json_resp
)
assert
token
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment