E9.2 Orchestrator always returns Error 500

ravijays

Member
Hi all
We have been creating REST API's using Orchestrator Form Requests for a while now. One thing that puzzles me is the return codes. AIS always returns 500 even for obvious data errors. Also the error messages are not very clear. This creates a problem for the calling system when receiving the response. Is there a way this can be made to return proper error codes and more meaningful messages? Help will be much appreciated. We are on Tools Release 9.2.4.2.
See the following response for a data error - In this case an Invalid Product Code. It returned a 500 error.
Response from AIS:
InternalServerError, Content:
{
"status": "ERROR",
"message": {
"ServiceRequest: FREQ_P47010_P3": {
"App Stack Form Exception": {
"Expecting Form": "P47010_W47010A",
"Resulting Form": "P47010_W47010B"
},
"JAS Response": {
"fs_P47010_W47010B": {
"title": "Inbound EDI Order Revisions",
"data": {},
"errors": [
{
"CODE": "0003",
"TITLE": "Error: Blanks Invalid",
"ERRORCONTROL": "1.0.10",
"DESC": "CAUSE . . . . The data field being processed does not allow blanks or zeros to be entered.\nRESOLUTION. . Enter a non-blank or non-zero value.",
"MOBILE": "The data field being processed does not allow blanks or zeros to be entered."
}
],
"warnings": []
},
"stackId": 1,
"stateId": 2,
"rid": "40df610c3120aa7e",
"currentApp": "P47010_W47010B",
"timeStamp": "2021-02-02:11.15.06",
"sysErrors": []
}
}
},
"exception": "Exception",
"timeStamp": "2021-02-02T11:15:06.014+1300",
"userDefinedErrorText": "",
"type": "application"
}

P.S. Posted in Technical forum and then realised there is one for Orchestrator separately
 
All data errors are now 500 error codes. They used to return a 200 in the older Orchestrator versions and then include the error message in a return field, but now most errors are 500 unless there is an connection issue where you might get a 401, 403, or 404 etc. I don't believe there is any way to change this, but you can define error handling on any step of your Orchestration and specify your own error messages there.
 
Back
Top