E9.2 AIS REST API Error Handling - Err 500 for all types?

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"
}
 
Top