Get Extended Error Details for Flows in the Tooling API

Do you use the Force.com Tooling API to build flows? In most places, we replaced the dreaded UNKNOWN_EXCEPTION error code with FLOW_EXCEPTION. And we added extended error details to most flow errors. That way, you can craft the right error message for your client.

Example

Error Message in Version 40.0 Error Message in Version 39.0
[ {
  "message" : "myRecordUpdate (Record 
Update) - Your org doesn't support 
encrypted fields in flows. Remove 
the reference to "AccountName".",
  "errorCode" : "FLOW_EXCEPTION",
  "fields" : [ ],
  "extendedErrorDetails" : [ {
    "extendedErrorCode" : 
"OBJECT_ENCRYPTED_FIELDS_NOT_SUPPORTED",
    "formulaExpression" : "AccountName"
  } ]
} ]
[ {
  "message" : "myRecordUpdate (Record 
Update) - Your org doesn't support 
encrypted fields in flows. Remove 
the reference to "AccountName".",
  "errorCode" : "UNKNOWN_EXCEPTION",
  "fields" : [ ],
} ]