can http status code and message be customized in IBM ODM ?
i see we can do exception handling in ODM, but the message goes to error logs and i dont see a way to customize http response and message (link attached blow) https://www.ibm.com/support/knowledgecenter/SSQP76_8.10.x/com.ibm.odm.dserver.rules.designer.run/shared_optimizing/tsk_excpt_custom.html
My Analysis :
please correct me if i'm wrong
1) Technical Exceptions are automatically handled with 400 and 500 status codes, i don't see any way to customize it
ex:
{
"code": 500,
"message": "An error occurred during the execution of the ruleset. Make sure that the request is valid, and review the ruleset and execution object model if applicable.",
}
{
"code": 404,
"message": "An error occurred during the initialization of the execution, make sure that the ruleset matches the execution requirements.",
"details": "Cannot get the information about the ruleset /project/1.0/service/1.1. Make sure that you have deployed the ruleset and that the enable property is set correctly.\n",
"errorCode": "GBRXH0501E"
}
2) Business Exception can only be handled with Http response 200, creating additional exception object and passing error code and message in it
Ex:
{
"status": null,
"Exception": {
"code": 400,
"message": state 'NJ' does not contain any business logic,
}
}