You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SCIM User helper crashes with UnboundLocalError instead of returning an error #666
Every method in wandb-scim/users.py handles HTTP errors like this:
try:
response=requests.get(url, **self.request_kwargs)
exceptrequests.HTTPError:
return {"error": f"Get user failed. Status code: {response.status_code}", ...}
request_kwargs installs a response hook that calls raise_for_status(). The hook raises inside requests.get(), before the assignment to response completes. The except branch then reads an unbound local and raises UnboundLocalError, so the documented error return values ("User not found", {"error": ...}) are never reached.
This affects all 10 methods: create, get, get_all, activate, deactivate, delete, assign_org_role, assign_team_role, assign_registry_role, remove_registry_role. The pattern appeared in #613.
Activity