This article provides a guide on tracking errors in custom connectors or Power Automate Flow calls from a Canvas App. Error handling is crucial for providing user-friendly messages and carrying out necessary actions when errors occur.
To enable error handling in a Canvas App, the Preview Feature Formula Level Error Management has to be turned on. The article shows how to track error details from another service like Power Automate Flow or Custom Connector.
For a Custom Connector, a connector is created with the Azure Open AI Service. If an error occurs (e.g., if the token limit is exceeded), the error message is passed to the Canvas App by parsing the JSON response of the custom connector.
To track errors from a Power Automate Flow, one can track the output of any action using expressions. A simple flow triggered from the Canvas App can get details like the Email ID. If the flow fails, the "actions" expression captures details as JSON. The error message is then retrieved, set up in a variable, and sent back to the Canvas Apps to display as a notification.
In both cases, specific code snippets are written in the "OnSelect" event of the relevant Canvas App button. This allows for capturing and displaying the error messages from the Custom Connector or Power Automate Flow.
Canvas Apps offer a powerful way to develop custom connectors and Power Automate Flows. With the introduction of Formula Level Error Management, developers can now handle errors efficiently during runtime. This feature helps in preventing crashes and allows for better user experience while working with complex data resources like APIs. By integrating Azure Open AI Service as a Custom Connector, we can ensure seamless data processing and management, making our Canvas App robust and efficient.
Read the full article Canvas Apps – Track errors in Custom Connector or Power Automate Flow call
Canvas Apps are a powerful way to create applications that can be used to track errors in Custom Connector or Power Automate Flow calls. To enable error handling, users must turn on the Preview Feature from the application's settings. This feature allows users to manage errors at a formula level.
Users can also enable custom connector error details in a Canvas App. This requires creating a custom connector with parameters such as api-version, prompt and max_tokens. The result should be in JSON format, and the value of the choices>text should be picked up in a variable within the Canvas App. If the max token limit is exceeded, the custom connector will throw an error. This error should be passed into the app in order for it to be handled properly.
Error handling is an important part of creating applications with Canvas Apps. By understanding how to enable and manage errors in Canvas Apps, users will be able to create more reliable and secure applications.
More links on about Canvas Apps – Track errors in Custom Connector or Power Automate Flow call
Canvas Apps, Custom Connector Error, Power Automate Flow Call, Formula Level Error Management, Preview Feature, Open AI Service