cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Superfly69
Frequent Visitor

Parse JSON - ValidationFailed: The schema validation failed

Hi,

I have a flow which runs and works.  On occasion it fails when there is no data that a Get HTTP request API makes.

Is there a way to handle this error?

 

The error I see sometimes is: "Parse_get_alerts_api_response_in_JSON' failed"

  "status""Data is not present for the given query"
 
  {
    "message""Invalid type. Expected Array but got Object.",
 
I have tried modifying the schema to accept null values like this - but still it fails if there is no data - any suggestions please?
{
  "type""array",
  "items": {
    "type""object",
    "properties": {
      "severity": {
        "type": [
          "string",
          "null"
        ]
      },
      "siteName": {
        "type": [
          "string",
          "null"
        ]
      },
      "source": {
        "type": [
          "string",
          "null"
        ]
      },
      "eventType": {
        "type": [
          "string",
          "null"
        ]
      },
      "deviceId": {},
      "customerName": {
        "type": [
          "string",
          "null"
        ]
      },
      "createdAt": {
        "type": [
          "string",
          "null"
        ]
      },
      "customerId": {
        "type": [
          "string",
          "null"
        ]
      },
      "siteId": {
        "type": [
          "string",
          "null"
        ]
      },
      "eventName": {
        "type": [
          "string",
          "null"
        ]
      },
      "networkId": {
        "type": [
          "string",
          "null"
        ]
      },
      "id": {
        "type": [
          "string",
          "null"
        ]
      },
      "state": {
        "type": [
          "string",
          "null"
        ]
      },
      "userSeverity": {
        "type": [
          "string",
          "null"
        ]
      },
      "updatedAt": {
        "type": [
          "string",
          "null"
        ]
      },
      "eventDetails": {
        "type": [
          "string",
          "null"
        ]
      },
      "timeSinceEpoch": {
        "type": [
          "string",
          "null"
        ]
      }
    }
  }
}

 

0 REPLIES 0

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,795)