Hello again! I'm having a weird behavior with the Python SDK, let me try to explain it here. I'm getting the following error, but only in a specific scenario:
RuntimeError("Cannot send a request, as the client has been closed.")
This only happens when I make two or more requests to Cerbos with the SDK
I have the following code:
for id in profile_skills_ids:
profile_skill = self.update(id=id, level=level)
And inside
update
I have the
client.is_allowed...
for checking the auth with Cerbos
c
Charith (Cerbos)
06/22/2022, 2:51 PM
That's strange. The internal client should only be closed when the context manager exits (or when
close()
is called)
Let me try this out
Oh wait..this is not just a simple loop. Can you please show how the Cerbos client is used inside the