Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-9631

Backport OPENIDM-8050: External IDM endpoint does not return response codes and errors

    Details

    • Story Points:
      1

      Description

      When you call out to an external rest service using:

      openidm.action('external/rest', 'call', params)

      You do not recieve any useful error messages. If the call succeeds with a 200 then everything is fine but in the event of anything other than a 200 all you get is an error in the logs that looks like this:

      Apr 08, 2017 8:52:57 PM org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior execute
      WARNING: Exception while executing scripttask2 : problem evaluating script: javax.script.ScriptException: org.forgerock.openidm.external.ExternalException: HTTP request failed
      Apr 08, 2017 8:52:57 PM org.forgerock.openidm.servlet.internal.ServletConnectionFactory$3 handleException
      WARNING: Resource exception: 500 Internal Server Error: "problem evaluating script: javax.script.ScriptException: org.forgerock.openidm.external.ExternalException: HTTP request f
      ailed"
      org.forgerock.json.resource.InternalServerErrorException: problem evaluating script: javax.script.ScriptException: org.forgerock.openidm.external.ExternalException: HTTP request
      failed
              at org.forgerock.openidm.workflow.activiti.impl.TaskInstanceResource.actionInstance(TaskInstanceResource.java:114)
              at org.forgerock.json.resource.InterfaceCollectionInstance.handleAction(InterfaceCollectionInstance.java:26)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:55)
              at org.forgerock.json.resource.Resources$CollectionInstanceIdContextFilter.filterAction(Resources.java:492)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
              at org.forgerock.json.resource.FilterChain.handleAction(FilterChain.java:222)
              at org.forgerock.json.resource.Router.handleAction(Router.java:250)
              at org.forgerock.json.resource.Router.handleAction(Router.java:250)
              at org.forgerock.openidm.workflow.activiti.impl.ActivitiResource.handleAction(ActivitiResource.java:65)
              at org.forgerock.openidm.workflow.activiti.impl.ActivitiServiceImpl.handleAction(ActivitiServiceImpl.java:205)
              at org.forgerock.json.resource.Router.handleAction(Router.java:250)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:55)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
              at org.forgerock.json.resource.Filters$ConditionalFilter.filterAction(Filters.java:44)
              at org.forgerock.json.resource.FilterChain$Cursor.handleAction(FilterChain.java:53)
              at org.forgerock.openidm.filter.ScriptedFilter$1.apply(ScriptedFilter.java:84)
              at org.forgerock.openidm.filter.ScriptedFilter$1.apply(ScriptedFilter.java:81)
              at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:247)
              at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:236)
              at org.forgerock.util.promise.Promises$CompletedPromise.thenAsync(Promises.java:215)
              at org.forgerock.openidm.filter.ScriptedFilter.filterRequest(ScriptedFilter.java:182)
      

      This makes it incredibly difficult to determine what is going wrong, can we add something to the logs with the actual response code and error?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mark.offutt Mark Offutt
                Reporter:
                cgdrake Chris Drake
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: