Hi, I'm getting a *`428 Precondition Required`* e...
# permit-saas
r
Hi, I'm getting a
428 Precondition Required
error when calling permit.api.users.getAssignedRoles(). I could not find any mention of this error in Permit's docs, can I get some clarification about what this error means? Thanks!
a
Hi @Rodrigo Mayer, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
I don't have specific documentation about the 428 Precondition Required error for
permit.api.users.getAssignedRoles()
in the available sources. To help our engineers investigate this issue, could you please provide: 1. Which Workspace / Project / Env you are using 2. What calls you are performing (as SDK code or CURL) 3. Which PDP version you are running 4. Any relevant logs from your PDP This information will help us understand what's causing the 428 error in your case. For immediate assistance, you can also reach out over Email . Would you like me to provide a general explanation of what a 428 Precondition Required error typically means in HTTP contexts?
Feel free to tag me with additional questions. I also appreciate feedback, it helps me improve. 👍 button 👎 button
t
Hey @Rodrigo Mayer what SDK are you using, and have you tried the call manually to eliminate an SDK issue?
r
Hey Thomas.
So this does not fail everytime
It fails around 1 every 10 calls
t
can you log the full request and response ?
r
We are using permit's node package
Version 2.7.5
t
also, what is your
workspace\project\env
?
r
Can we move this to a private chat?
t
feel free to DM me
👍 1
r
So the problem was the request rate to Permit. We used to make many calls in sequence, so adding some delays between requests fixed the issue. Would be nice to get a 429 error instead of a 428, though. Thanks @Thomas for the help.
p
Hey, thanks for reaching out ! It seems our team is a little busy right now, a human will be with you within the next hour or so. In the meantime, can I help you ?
t
Glad to know @Rodrigo Mayer. The team is investigating and will follow up here.