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.5K All Categories
- 86 General
- 13 Training
- 212 Installation / Setup
- 1.2K Flows
- 112 Rules
- 277 Administration
- 215 Portal
- 502 General Q & A
- 721 Forms
- 355 Reports
- 3 Designer Extensions
- 47 Example Flows
- 58 CSS Examples
- 1 Diagram Tile
- 8 Javascript Controls
- 189 Pages
- 5 Process Mining
- New Features
- 187 Datastructures
- 72 Repository
- 237 Integrations
- 30 Multi-Tenant
- 27 SDK
- 81 Modules
- 60 Settings
- 26 Active Directory
- 12 Version 7
- 36 Version 8
- 143 Lunch And Learn Questions