E9.2 JDE Orchestrator Connector Malformed Response

schmidma

Member
Hi,

We are calling a REST/POST API from Orchestrator - using a connector through a connection - and it works well. However, when there are issues with say the data or duplicates etc, the API will return a JSON file, but it'll return a http code of say 422 - suffice to say it's not returning 200's.

When the API does return a 200 (ie the happy path) everything works well, the return JSON comes back and we map out the fields to our output.

The connector output is set to JSON.

When we get non 200 returns, we get this:
Code:
"continuedOnError": [
    {
      "step": "CONN_API_CUSTOM",
      "message": {
        "ServiceRequest: CONN_API_CUSTOM": {
          "statusCode": 422,
          "error": "java.lang.Exception: External Generic Call Failed See Log For Details: 422 {\"id\":\"\",\"message\":\"Validation Issue : Shipment Is Duplicate\",\"response\":\"Type : Validation Issue\"}",
          "headers": {}
        }
      }


When we run it via postman/curl we get:
Code:
{
    "id": "",
    "message": "Validation Issue : Shipment Is Duplicate",
    "response": "Type : Validation Issue"
}


It looks like the orchestration just fails outside of anything 200 - fires a java error, and then dumps the stack back through the error.

We are mapping id/message/response out of our orchestration, but because it's all wound up in the error dump we never get it - are we missing a setting, is this a bug others are seeing, how do you get around this?

We're not sure where else to go from here.

A similar issue is listed here (with no answer): https://www.jdelist.com/community/t...t-api-json-connector-output.57939/post-203087

Our JDE instance: 9.2.6.1
 
Hi schmidma
It looks like the connector like you say show a different Repply JSON depends of the return, for a workarround you can manipulate the response exit response whit a custom groovy or a custom jruby (currently i dont use this language)
1668432365633.png
If you like, i can help you to write the necessary code, but in order to do that i need that you send me a 200 response and the configuration of your output
 
Back
Top