Web API not returning validation error after "AddUser" node in process model was canceled by exception

I cannot figure out how to return the error message from a process model.  Specifically, the "Add User" node is getting canceled by exception, for example, "Username has already been taken."  I want this error to be returned back into the Web Api service created that starts it... I've successfully been able to add a property to the json that the Web Api responds back to my application that calls it, I named the property "errorMessage."  Of course it's always empty because I haven't been able to figure out how to populate it with the error message mentioned.  Attached are screenshots to further clarify the issue I'm having creating this:

 

 

Actual text: 

with(
a!startProcess(
processModel: cons!CONSTANT_SWF_sendEmailToVerifyAccount,
processParameters: a!fromJson(
http!request.body
),
onSuccess: a!httpResponse(
statusCode: 200,
headers: {
a!httpHeader(
name: "Content-Type",
value: "application/json"
)
},
body: a!toJson(
fv!processInfo
)
),

onError: {
a!httpResponse(
statusCode: 500,
headers: {
a!httpHeader(
name: "Content-Type",
value: "application/json"
)
},
body: a!toJson(
{
error: "There was an error starting the process"
}
)
),
a!startProcess(
processModel: cons!SWF_CREATE_USER_ACCOUNT_RESULT,
processParameters:{
location: "Create User Process Failed TEST"
}
)
}
)
)

 

and screenshot from Web Api response:

 

If anyone knows or has any suggestions for me to correct this problem, let me know.


Kind regards,
Eric

  Discussion posts and replies are publicly visible