PL 400: Troubleshoot flows by analyzing JSON responses from connectors(Configure Power Automate)

App creators and developers always face such challenges regarding unexpected behavior of apps and spend time to find the root cause of the problem which is called as troubleshooting. Troubleshooting is a systematic and logical approach to solving a problem. The main reason for troubleshooting is to determine why something doesn't work as expected and how to fix the problem.


Automated workflow processes play a vital role in the success of businesses, and if a workflow fails, it is important that it be notified immediately. Exception handling is a mechanism that allows Power Automate to deal with and recover from unexpected situations and problems that may arise during flow runs. Microsoft Flow Connector allows us to connect/integrate services, applications, and third-party applications. A connector is a proxy or wrapper around an API that allows others to communicate. Microsoft Flow Connectors tell Microsoft Flow which APIs to use, and what requests and responses they support. Connectors are nothing but metadata for applications. Each request through the connector is just a web service call, then it receives a status code response, headers sent back by the server, and the body of the response. By using the output() function in an expression, we are able to get the full HTTP response from a connector action.

{
  "statusCode": 200,
  "headers": {
    "Pragma": "no-cache",
    "Vary": "Accept-Encoding",
    "x-ms-request-id": "a916ec8f522112kdoddoe2efe0b",
    "X-Content-Type-Options": "nosniff",
    "Timing-Allow-Origin": "*",
    "Cache-Control": "no-cache",
    "Date": "Mon, 27 Dec 2021 18:47:12 GMT",
    "Set-Cookie": "ARRAffinity=b9400932367ab5e3b6802e3d6158afffb12fcde8666715f5a5fbd4142d0f0b7d;Path=/;HttpOnly;Domain=-wus.azconn-wus.p.azurewebsites.net",
    "X-AspNet-Version": "4.0.30319",
    "X-Powered-By": "ASP.NET",
    "Content-Type": "application/json; charset=utf-8",
    "Expires": "-1",
    "Content-Length": "339"
  },
  "body": {
    "FullName": "Lion Inc",
    "Location": "D131, Delhi",
    "Id": 2717,
    "UserName": "lionUser",
    "FollowersCount": 231,
    "Description": "this is testing .",
    "StatusesCount": 93,
    "FriendsCount": 126,
    "FavouritesCount": 46,
    "ProfileImageUrl": ""
  }
}

Flow Checker is a verification and troubleshooting tool built into the Power Automate interface. This can be used to help identify potential issues during the development and troubleshooting process. Microsoft Flow uses the standard HTTP error reporting format for the JSON API. Successful requests return HTTP status codes in the 2xx range. Failed requests return status codes in the 4xx and 5xx ranges. Requests that require a direct return status code in the 3xx range. Error responses usually include a JSON document in the response body that contains information about the error.

The following examples show some common errors :

Error Code : 401, 403
Reasons : Incorrect credentials.
Resolution: Verify that the account credentials are correct

Error Code : 400
Reasons : Bad request
Resolution: Verify that the correct (Get or Post) is being used.

Error Code : 404
Reasons : Not found
Resolution: Verify that the URI or URL paths specified are valid.

Error Code : 502
Reasons : Bad Gateway
Resolution: Verify the correct HTTP protocal

Error Code : 503
Reasons : Service unavailable.
Resolution: Wait and retry

Error Code : 504
Reasons : Gateway timeout
Resolution: Verify the proxy or firewall.

Power Automate is built on accessing standard web service protocols and REST-based API resources. verify the errors in the flow to determine if these common errors are present.

Comments

  1. PL 400: Troubleshoot flows by analyzing JSON responses from connectors(Configure Power Automate)

    Very informative post for the developers...!

    They can try this to analyze JSON responses...

    We are here to share our blog - A Complete Guide about the Benefits of Using Power Automate

    Microsoft power automate services

    ReplyDelete

Post a Comment

Popular posts from this blog

PCF vs. Web Resources: Choosing the Right Extensibility Tool for Dataverse

Is Debt Prosperity or Trap?

Exam PL-400: Microsoft Power Platform Developer