Hello, when updating user attributes we are receiv...
# permit-saas
l
Hello, when updating user attributes we are receiving a 500 error both using your API and via your UI. The update actually seems to succeed but the response takes ages to return and when it does it's a 500 error. I've recorded this happening via the UI in the video attached. The logs claim the response returned a 200 when it didn't, see attached image. The UI isn't so much of an issue for us as we don't use it in this way (it just seemed like a good way to illustrate the problem), but it's causing problems with how we need to use the API. URL
PATCH /v2/facts/9aa8bcdc454049cd8c1459f6d1215b4f/890e358221b34dee9ac6fb6103b762f8/resource_instances/3804d4a9ef3144ec98aa17b22e274a1b
Body
Copy code
{
  "attributes": {
    "id": "83136998-510c-4f3d-8316-97e503a4ff4a",
    "name": "2nd Wood Doc",
    "owner": "7ca6992a-726f-4ddf-bdbc-8d5b8baa0c0e",
    "tenant": "c8217bd9-ed07-4898-b455-f9c9eb615977",
    "documentTypeId": "8f419f7a-7ea3-413e-a09b-2142504c579f",
    "isSmartDocument": true
  }
}
workspace = alex-trustflight-sandbox project = sandbox env = lewisdevelopment
a
Hi @Lewis Youl, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
I understand you're experiencing 500 errors with long response times when updating user attributes through both the API and UI, even though the updates appear to succeed. This is indeed frustrating. To help our engineers investigate this issue, could you please provide: 1. ​*Which Workspace / Project / Env you're using*​: You mentioned alex-trustflight-sandbox / sandbox / lewisdevelopment 2. ​*What calls you're performing*​ (as SDK code or CURL) : You've shared the PATCH request to
/v2/facts/.../resource_instances/...
3. ​*Which PDP version you're running*​: Please share your current PDP version 4. ​*Relevant logs from your PDP*​: Any PDP logs around the time of these requests would be
Feel free to tag me with additional questions. I also appreciate feedback, it helps me improve. 👍 button 👎 button
o
Hey @Lewis Youl , is the response 500 or 504 ? If it’s 504 it’s most probably a performance issue in this api which makes it reach to a gateway timeout (504) - in this scenario the request to finish eventually in the server
l
It's a 500
You can see it in the video. Also this is what the sdk prints:
Copy code
{
  "level": 50,
  "time": "2025-08-29T16:51:37.632Z",
  "label": "<http://Permit.io|Permit.io>",
  "msg": "Got error status code: 500, err: {\"error\":\"Uncaught server exception\"}"
}
o
The video doesn’t show anything in the network tab We’ll try to find it on our logs
Does the attributes end up updated after the api log is shown ?
l
The video doesn’t show anything in the network tab
Oh sorry I thought it did. Yes the attributes are updated even though it returns a 500. I'm try and replicate it again today.
👍🏼 1