Uploaded image for project: 'OpenICF'
  1. OpenICF
  2. OPENICF-847

ServiceNow: Getting a non existing user return code 500

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: servicenow-connector-1.5.0.0
    • Component/s: ServiceNow Connector
    • Labels:
    • Environment:
      ServiceNowConnector: 1.5.0.0-SNAPSHOT (SCM-Revision: 96ca9ebfbcaf37b00a1b14a547ec844cc023b71f)
      OpenIDM version "6.0.0-SNAPSHOT" (revision: f2587af)
      Linux Mint 18.2 Cinnamon 64-bit
      openjdk version "1.8.0_151"

      Description

      Getting a non existing user return status code 500 and displayed exception in openidm console/logs.

      Steps to reproduce:

      1. Download, unzip openidm, start openidm and set up ServiceNow connector according documentation
      2. Send GET request on non-existing user
        curl -X GET \
          http://localhost:8080/openidm/system/ServiceNow/user/NOT_EXISTING_SYS_ID \
          -H 'x-openidm-password: openidm-admin' \
          -H 'x-openidm-username: openidm-admin'

      Actual result:
      OpenIDM console displayed exception and returned code status 500.

      {
          "code": 500,
          "reason": "Internal Server Error",
          "message": "Operation READ failed with ConnectorException on system object"
      }
      Mar 23, 2018 10:43:49 AM org.apache.http.impl.client.CloseableHttpClient execute
      WARNING: HTTP response status is 404
      Mar 23, 2018 10:43:49 AM org.forgerock.openicf.connectors.servicenow.client.ServiceNowClient getRecord
      WARNING: API exception occurred. The response body is: {"error":{"detail":"Record doesn't exist or ACL restricts the record retrieval","message":"No Record found"},"status":"failure"}
      Mar 23, 2018 10:43:49 AM org.forgerock.openicf.connectors.servicenow.ServiceNowConnector executeQuery
      SEVERE: Failed to get record
      Mar 23, 2018 10:43:49 AM org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3 lambda$handleRequestWithLogging$8
      WARNING: Resource exception: 500 Internal Server Error: "Operation READ failed with ConnectorException on system object"
      org.forgerock.json.resource.InternalServerErrorException: Operation READ failed with ConnectorException on system object
      	at org.forgerock.openidm.provisioner.openicf.impl.ExceptionHelper.adaptConnectorException(ExceptionHelper.java:159)
      	at org.forgerock.openidm.provisioner.openicf.impl.ObjectClassResourceProvider.handleRead(ObjectClassResourceProvider.java:562)
      ...
      ...

      More at openidm0.log.0 openidm0.log.1

      Expected result:
      The GET request should be returned 404 status code and OpenIDM console should not displayed exception. Response can look some like:

      {
          "code": 404,
          "reason": "Not Found",
          "message": "Resource path not found"
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                petr.jurica Petr Jurica [X] (Inactive)
                Reporter:
                miroslav.meca Miroslav Meca
                QA Assignee:
                Miroslav Meca
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: