Managing Errors in State Execution | Error Selector and Error Path | Online Help | Circuit | Qntrl

Error selector and Error path

Error Selector and Error Path are used to manage errors in a system. While Result Selector and Result Path control the output of a state upon successful execution, Error Selector and Error Path come into play when the are exceptional circumstances, enabling a fallback to the next state in case of an error during execution. This feature is not available for Flow Controls but is specifically designed for Functional states and Bridge Controls.

Error selector

Error Selector is used to define how the system should respond when an error occurs during state execution. It lets you configure specific actions or data to be used in response to an error. You define key-value pairs, similar to Result Selector, where each key represents an action or error data. These values can be either static or derived from the error details.

For instance, in an employee onboarding system, you might configure Error Selector to extract error codes and messages dynamically from error details during execution.

 

Here's how you can configure an Error Selector in Code view.

To Define static error values:
"error_selector": {
      "error_code": "EXC_TME_EXC",
      "error_message": "Execution Time Exceeded"
}

To dynamically retrieve error details from the execution during error scenarios:

"error_selector": {
      "error_code": "$.error_code",
      "error_message": "$.error_description"
}
In this example, when an error occurs, the system will extract the "error_code" and "error_description" from the error details and make them available for further processing or response.

Error Path

Error Path specifies the location where the error details should be directed for further analysis or handling. If the Error Path isn't specified, the processed input from the previous state is automatically sent to a designated fallback state when an error occurs.


In your employee onboarding system, you may need to direct error details to a designated path, like '$.error'. Here's how you can set up the Error Path in the Code view:
{
      "onboard_employee": {
            "type": "function",
            "next": "End",
            "start": true,
            "function_id": "function_emp_onboard_1",
            "on_error": [
            {
                  "error_type": "timeout_error",
                  "fallback": {
                        "next": "End",
                        "error_selector": {
                              "error_code": "EXC_TME_EXC",
                              "error_description": "Execution Time Limit Exceeded"
                        },
                        "error_path": "$.error"
                  }
            }
            ]
      }
}

In this case, the error details are sent to the '$.error' path for further evaluation and appropriate action.

 

The example JSON below illustrates sample error details generated by the system during an error occurrence, providing information about the error's nature and context for further actions. 
{
      "status": "error",
      "message": "Employee onboarding failed",
      "error_code": "EXC_TME_EXC",
      "error_description": "Execution Time Exceeded"
}


      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsEnterpriseOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceAccessible Forms
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit
                              Intake FormsLegalMobile App
                              Form DesignerHRMobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic Forms
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsEncrypted Forms

                              Secure Forms

                              WCAG

                                      Create. Review. Publish.

                                      Write, edit, collaborate on, and publish documents to different content management platforms.

                                      Get Started Now






                                                        You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                            Manage your brands on social media

                                                              Use cases

                                                              Make the most of Zoho Desk with the use cases.

                                                               
                                                                

                                                              eBooks

                                                              Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                                               
                                                                

                                                              Videos

                                                              Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                                               
                                                                

                                                              Webinar

                                                              Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                               
                                                                
                                                              • Desk Community Learning Series


                                                              • Meetups


                                                              • Ask the Experts


                                                              • Kbase


                                                              • Resources


                                                              • Glossary


                                                              • Desk Marketplace


                                                              • MVP Corner

                                                                Zoho Sheet Resources

                                                                 

                                                                    Zoho Forms Resources


                                                                      Secure your business
                                                                      communication with Zoho Mail


                                                                      Mail on the move with
                                                                      Zoho Mail mobile application

                                                                        Stay on top of your schedule
                                                                        at all times


                                                                        Carry your calendar with you
                                                                        Anytime, anywhere




                                                                              Zoho Sign Resources

                                                                                Sign, Paperless!

                                                                                Sign and send business documents on the go!

                                                                                Get Started Now




                                                                                        Zoho TeamInbox Resources





                                                                                                  Zoho DataPrep Demo

                                                                                                  Get a personalized demo or POC

                                                                                                  REGISTER NOW


                                                                                                    Design. Discuss. Deliver.

                                                                                                    Create visually engaging stories with Zoho Show.

                                                                                                    Get Started Now









                                                                                                                        • Related Articles

                                                                                                                        • Result Selector and Result Path

                                                                                                                          Result Path and Result Selector are employed to extract dynamic data from the state's result when the execution is successful. Result Selector Result selector lets you retrieve and process the runtime data, enabling flexible and dynamic data ...
                                                                                                                        • Error Handling

                                                                                                                          In Qntrl Circuit, you can configure error handling while building a circuit. In most cases, state definition errors are detected even before saving the circuit, i.e. when you save the circuit, it runs a compilation check and lists out errors related ...
                                                                                                                        • Output Path

                                                                                                                          Output Path enables you to select a portion of the state's output and transfer it to the next state for processing, eliminating any unecessary objects from the JSON output. If the Output Path isn't specified, the entire JSON node (determined by the ...
                                                                                                                        • Input Path

                                                                                                                          Input Path enables you to filter and control the actual input passed to the state. By defining an Input Path (either in Builder View or Code View), using JSONPath notation, you can select a portion of the JSON input and use it for processing within ...
                                                                                                                        • JSON Path

                                                                                                                          Path serves to locate specific parts or components within a JSON object. These paths start with the '$' symbol and follow JSONPath syntax. It is used to access particular elements or values within JSON objects passed in the Input Path, Output Path, ...
                                                                                                                          Wherever you are is as good as
                                                                                                                          your workplace

                                                                                                                            Resources

                                                                                                                            Videos

                                                                                                                            Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                            eBooks

                                                                                                                            Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                            Webinars

                                                                                                                            Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                            CRM Tips

                                                                                                                            Make the most of Zoho CRM with these useful tips.



                                                                                                                              Zoho Show Resources