Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-1067

NCMP returns 500 error on searches endpoint when No DMi Handles registered

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Kohn Release
    • Jakarta Release
    • NCMP
    • None

      Summary

      When you execute a query against the /ncmp/v1/ch/searches endpoint without any registered cmHandles, NCMP return a 500 error instead of empty response or not found code.

       

      Sample request body against /ncmp/v1/ch/searches:

      {
          "conditions": [
              {
                  "name": "hasAllModules",
                  "conditionParameters": [{
                      "moduleName": "enm-GNBDU"
                  }]
              }
          ]
      }

       

      Sample response:

      {
      "status": "500 INTERNAL_SERVER_ERROR",
      "message": "Yang resource not found",
      "details": "No yang resources found for [enm-GNBDU] in dataspace NFP-Operational."
      } 

       

      It could be any moduleName.

      The expectation on the client side would be HTTP 404 Not found code, or 200 OK response code with empty body.

            kissand kissand
            emolger Gergely Molnar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: