можно ли настроить код состояния http и сообщение в IBM ODM?
я вижу, что мы можем выполнять обработку исключений в ODM, но сообщение отправляется в журналы ошибок, и я не вижу способа настроить ответ и сообщение http (ссылка прилагается) https://www.ibm.com/support/knowledgecenter/SSQP76_8.10.x/com.ibm.odm.dserver.rules.designer.run/shared_optimizing/tsk_excpt_custom.html
Мой анализ:
Пожалуйста, исправьте меня, если я ошибаюсь
1) Технические исключения автоматически обрабатываются с кодами состояния 400 и 500, я не вижу способа его настройки
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) Бизнес-исключение может быть обработано только с Http-ответом 200, создавая дополнительное исключение объект и передавая код ошибки и сообщение в нем
Пример:
{
"status": null,
"Exception": {
"code": 400,
"message": state 'NJ' does not contain any business logic,
}
}