Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-6938

Show SQL detailed errors when performing API

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • None
    • API (A)
    • None
    • Frontend version 5.x

      Could you, please, consider returning an actual SQL error when performing API calls which fail on SQL query execution?

      So, for example, instead of "SQL statement execution has failed":

      SQL statement execution has failed \"INSERT INTO hosts (host,proxy_hostid,name,description,hostid) VALUES ('ABC-ABCDEFGHIJ-KL1234-Mnop-3-QRUVW','11723','ABC-ABCDEFGHIJ-KL1234-Mnop-3-QRUVW','','21722')

      An actual detailed error:

      ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`hosts`, CONSTRAINT `c_hosts_1` FOREIGN KEY (`proxy_hostid`) REFERENCES `hosts` (`hostid`))

      Would be returned if the SQL query is being executed anyway.

            zabbix.dev Zabbix Development Team
            asincovs Antons Sincovs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: