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

Avoid flow failing using a condition check for HTTP Header value

Hi,

I have a flow that runs and does a HTTP call to an API endpoint and retrieves log files from it.  This works fine when there is data in the endpoint logs.

However, on occasion there may be no data in the logs since the last run and I will end up an error and "data is not present" message.

I am trying to build in an error condition to cover this failure.  What I have noticed is that when there is no data it always has the same "Content-Length" in the headers.  So I have adjusted the flow to try and identify when the Content-Length equals a value and then terminate, but it is not running quite right yet.  Any suggestions please?

 

 

Superfly69_0-1654976023772.png

 

In Check Headers I am using "outputs('Get_alerts_API')['headers']?['Content-Length']" which correctly identifies the Content-Length as 52.  This is the value which means there is no data present in the logs.

 

The Check Content Length condition is not working 

 

 

Superfly69_2-1654976806670.png

 

Superfly69_3-1654976834550.png

Could anyone help me understand what I am missing? 

Many thanks in advance.

 

1 REPLY 1
Superfly69
Frequent Visitor

I think it is solved now by using string(value) in the condition

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 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 (4,035)