Error based SQL injection

It was observed that the application is vulnerable to Error based SQLi. Error-based SQLi is an in-band SQL Injection technique that relies on error messages thrown by the database server to obtain information about the structure of the database. In some cases, error-based SQL injection alone is enough for an attacker to enumerate an entire database. how we can fix this in frappe?

I’m facing the same issue