Hi Elia,
You can find more information on the error from the SMP server logs.
After changing the Integration gateway log level to debug ( Login to SMP admin cockpit>Logs> settings) perform the query and look at the server logs (Login to SMP admin cockpit>Logs> log files>hostname-smp-server.log).
Regards, Midhun
SAP Technology RIG