Appendix C: Types of Exceptions in OpenL Rule Services
Appendix C: Types of Exceptions in OpenL Rule Services
The following table describes exception types in OpenL Rule Services:
Cause: error(“Some message”) in rules
Status code: 400
REST:
{
message : “Some message”,
type : “USER_ERROR”
}
Cause: Runtime execution error in OpenL rules, such as NPE, CCE, and DivByZero.
Status code: 500
REST:
{
message : “Cannot convert ‘1ab2’ to Double”,
type : “RULES_RUNTIME”
}
Cause: Compilation and parsing errors.
Status code: 500
REST:
{
message : “Missed condition column in Rules table”,
type : “COMPILATION”
}
Cause: Other exception outside the OpenL engine, such as NPE, CCE, and AccessException.
Status code: 500
REST:
{
message : “Cannot be null”,
type : “SYSTEM”
}
Cause: Validation errors in input parameters, such as a value outside of a valid domain or wrong value in the context.
Status code: 500
REST:
{
message : “‘Mister’ is outside of valid domain [‘Male’, ‘Female’]”,
type : “RULES_RUNTIME”
}