Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-9340

api error response is missing "data" property in case of database down

    Details

      Description

      When Zabbix database is down, any api request correctly fails with a json error message (before 2.2, the error was not json, but just HTML, it was fixed in 2.2.x).
      However the error message misses the "data" property:

      {"jsonrpc":"2.0","error":{"code":1,"message":"Error connecting to database [No such file or directory]"},"id":0}
      

      while the API documentation ( https://www.zabbix.com/documentation/2.4/manual/api) states that:

      "If an error occurred, instead of the result property, the response object will contain an error property with the following data:

      • code - an error code;
      • message - a short error summary;
      • data - a more detailed error message."

      so either the documentation needs to be updated or the error in this case, should also contain a "data" property.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gabriele.armao gabriele.armao
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: