CXone Studio DBConnector action returning 500 on valid SQL query

We’ve got a weird issue popping up in our Studio script where the DBConnector action fails consistently with a 500 Internal Server Error. The SQL query itself is fine, I’ve tested it directly in the database client and it returns results in milliseconds. The connection string in the Studio environment is verified and working for other lookups. Here’s the snippet we’re using:

{
 "action": "DBConnector",
 "name": "LookupCustomerData",
 "parameters": {
 "connectionString": "${env.DB_CONNECTION_STRING}",
 "sql": "SELECT * FROM customers WHERE id = ?",
 "params": ["${data.customerId}"]
 }
}

The error message in the Studio logs just says ‘Database query failed’ without any more detail. We’ve tried escaping the parameters, using named parameters, and even hardcoding the value instead of using the variable. Nothing works. The data.customerId is definitely populated at this point in the flow. I’ve checked the network traffic and the request is going out, but the response is always a 500. Is there a known issue with the DBConnector action handling certain data types or is this a bug in the CXone platform? We’re running the latest version of Studio and the database is a standard PostgreSQL instance. Any ideas on how to debug this further or work around the issue? We’ve been stuck on this for two days and it’s blocking our deployment. The error doesn’t give enough info to pinpoint the problem. We’ve tried restarting the Studio environment, but that didn’t help. The query works fine outside of Studio. It seems like the issue is specific to how Studio is executing the query or passing the parameters. We’ve also tried using a different database user with the same permissions, but the result is the same. The 500 error is generic and doesn’t provide any stack trace or additional context. We’ve reached out to CXone support, but they’ve been slow to respond. Any help or suggestions would be appreciated. We’re running out of options and need to get this working. The script is otherwise simple and straightforward. Just a basic lookup and then a route to a queue. The DBConnector action is the only complex part. We’ve used this action before without issues. It’s just this specific query that’s failing. We’ve tried simplifying the query to just SELECT 1, but that fails too with the same 500 error. So it’s not the query complexity. It’s something about the connection or the action itself. We’ve checked the firewall rules and the database is accessible from the CXone environment. The connection string is correct. The credentials are correct. The database is up and running. It’s just the Studio action that’s failing. We’re at a loss. Any ideas? We’ve tried everything we can think of. The error is consistent. Every time the action runs, it fails with 500. No exceptions, no variations. Just a flat 500 error. We’ve logged the inputs and outputs. The input is correct. The output is an error. There’s no middle ground. It’s binary. Either it works or it doesn’t. And right now, it doesn’t work. We need a solution. Or at least a hint. Something to point us in the right direction. We’re stuck.