Incorrect exception handling of user.get and userids

XMLWordPrintable

    • Type: Problem report
    • Resolution: Fixed
    • Priority: Trivial
    • None
    • Affects Version/s: 7.0.11
    • Component/s: 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

            Assignee:
            Zabbix Development Team
            Reporter:
            Ruslan Aznabaev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: