According to the userguide of activiti-rest, when an error occurs, and the headers "Accept" (and Content-Type) are set to application/json, this content appears:
{
"statusCode" : 404,
"errorMessage" : "Could not find a task with id '444'."
}
But in version 5.17 this has changed into:
{
message: "Not found",
exception: "Could not find a task with id '444'."
}
When an Exception occurs, a stacktrace is returned instead of this json object. For an example see the attached file
and look for userTask "sid-03ECA751-1348-4729-969E-65A6B4EB66B5". In the scriptTask this happens:
if (var1 != 'ok'){throw new Exception ('<error>correct value for var1 is: ok</error>')}
In the past this body was returned:
{
"statusCode" : 500,
"errorMessage" : "<error>correct value for var1 is: ok</error>"
}
Now I got this (headers included):
HTTP/1.1 500 Server Error
Cache-Control: must-revalidate,no-cache,no-store
Connection: close
Pragma: no-cache
Server: Jetty(9.1.3.v20140225)
Content-Length: 74099
Content-Type: text/html; charset=ISO-8859-1
Client-Date: Thu, 23 Apr 2015 07:59:45 GMT
Client-Peer: 157.193.228.57:8888
Client-Response-Num: 1
Title: Error 500 Server Error
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 Server Error</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /activiti-rest/service/form/form-data. Reason:
<pre> Server Error</pre></p><h3>Caused by:</h3><pre>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.activiti.engine.ActivitiException: problem evaluating script: javax.script.ScriptException: java.lang.Exception: <erro…