How Can I Get Better Errors From A Flow API
Comments
-
Do you have a recommended way for your clients who use the API when it comes to handling (deserializingparsing) the Fault exceptions thrown?
Examples
[i]System.ServiceModel.FaultException
1[DecisionsFramework.ServiceLayer.Utilities.FrameworkFault]: Object reference not set to an instance of an object. (Fault Detail is equal to DecisionsFramework.ServiceLayer.Utilities.FrameworkFault).[/i] [i] [/i] [i]System.ServiceModel.FaultException
1[DecisionsFramework.ServiceLayer.Utilities.FrameworkFault]: [SecurityException] Username/Password is invalid. (Fault Detail is equal to DecisionsFramework.ServiceLayer.Utilities.FrameworkFault).[/i]
[i] [/i]
[i]System.ServiceModel.FaultException`1[DecisionsFramework.ServiceLayer.Utilities.FrameworkFault]: Exception of type DecisionsFramework.ServiceLayer.InvalidUserSessionException was thrown. (Fault Detail is equal to DecisionsFramework.ServiceLayer.Utilities.FrameworkFault).[/i]
[i]
[/i]
[i]
[/i]
These error messages dont tell us much on their own, and the full error message data only shows up in the Decisions UI. -
[font=Roboto, Arial, Helvetica, sans-serif]You can use a Catch Exception step in the flow youre calling, place a Create Data step after it, and generate a JSON-formatted error message to pass into the flows output. You can then check for an error in that output from the API call in the external code.[/font]
[font=Roboto, Arial, Helvetica, sans-serif]
[/font]
[font=Roboto, Arial, Helvetica, sans-serif]Attached is a rough example of how to configure a flow to return a JSON error message. You can specify a response code to work with if the flow returns an error, but the call itself will have a 200 response.[/font]
Howdy, Stranger!
Categories
- 4.2K All Categories
- 67 General
- 11 Training
- 202 Installation / Setup
- 1.1K Flows
- 106 Rules
- 262 Administration
- 212 Portal
- 490 General Q & A
- 695 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 52 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 179 Pages
- 5 Process Mining
- New Features
- 179 Datastructures
- 69 Repository
- 221 Integrations
- 28 Multi-Tenant
- 27 SDK
- 78 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 83 Lunch And Learn Questions