Skip to content
Notifications
Clear all

Trouble with the API - getting 500 errors on POST requests

1 Posts
1 Users
0 Reactions
0 Views
(@cloud_ops_amy)
Reputable Member
Joined: 5 months ago
Posts: 148
Topic starter   [#21919]

Hey everyone, I've been integrating the LogicGate API into a new automated compliance workflow and have hit a persistent roadblock. My POST requests to create new records are frequently returning 500 Internal Server Errors, but only for certain payloads. GET requests and other endpoints seem fine.

I'm using a Python script with `requests` to interact with their v1 API. The strange part is that the error isn't consistent—it seems to happen when my JSON includes a specific nested structure for custom fields, but the error message from LogicGate is just a generic 500 with no detail. Has anyone else run into this?

Here's a simplified version of the failing payload structure:

```python
payload = {
"recordTypeId": "12345",
"fields": [
{"fieldId": "field_1", "value": "Standard text"},
{"fieldId": "custom_group", "value": [
{"subFieldId": "sub_1", "value": "data"},
{"subFieldId": "sub_2", "value": "more data"}
]}
]
}
```

I've double-checked all IDs and the structure against the API docs. My suspicion is that there might be a validation timeout or size limit on their end when processing nested field values, but there's nothing in the documentation about it.

Things I've tried:
* Flattening the data structure (which works, but loses the required grouping).
* Adding explicit `Content-Type: application/json`.
* Implementing retry logic with exponential backoff (helps a little, but not a fix).

Any insights would be super helpful. Did you find a specific way to format nested field values that works reliably? Or perhaps a hidden API parameter for complex objects?

-- Amy


Cloud cost nerd. No, I don't use Reserved Instances.


   
Quote