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

Incorrect exception handling of user.get and userids

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.11
    • API (A)
    • None

      Steps to reproduce:

      1. Make request with incorrect userids value:
        {"jsonrpc":"2.0","method":"user.get","params":{"userids": [[415]]},"id":2}

      Result:

      {"jsonrpc":"2.0","error":{"code":-32500,"message":"Application error.","data":"Database error occurred."},"id":2}

      Expected:
      Something like:

      {"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error","data":"Invalid JSON. An error occurred on the server while parsing the JSON text."},"id":null}

      Maybe, it caused by https://git.zabbix.com/projects/ZBX/repos/zabbix/commits/7141b8fcfab8de00752c9a73b56b21877bda1251#ui/include/classes/api/clients/CLocalApiClient.php

        1. test_calls.sh
          2 kB
          Piotr Zakrzewski

            zabbix.dev Zabbix Development Team
            NexonSU Ruslan Aznabaev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: