cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
niamhks
Level: Powered On

JSON Format error when using 'Get Rows' from SQL

Hi All, 

 

I would really appreciate some advice with building this flow! 

 

I am essentially trying to get rows that were created in the year 2018 (which works fine) it just fails with the error 'The response is not in a JSON format.'

 

Any ideas on why or how to fix? 

 

Thanks! (Screenshot below)

 

Niamh 

flowhelp.JPG

Error message as follows: 

{
  "error": {
    "code"502,
    "source""europe-001.azure-apim.net",
    "clientRequestId""2681a407-d066-447d-b629-6239be1c697e",
    "message""The response is not in a JSON format.",
    "innerError""<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>\r\n<title>502 - Web server received an invalid response while acting as a gateway or proxy server.</title>\r\n<style type=\"text/css\">\r\n<!--\r\nbody{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}\r\nfieldset{padding:0 15px 10px 15px;} \r\nh1{font-size:2.4em;margin:0;color:#FFF;}\r\nh2{font-size:1.7em;margin:0;color:#CC0000;} \r\nh3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} \r\n#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:\"trebuchet MS\", Verdana, sans-serif;color:#FFF;\r\nbackground-color:#555555;}\r\n#content{margin:0 0 0 2%;position:relative;}\r\n.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<div id=\"header\"><h1>Server Error</h1></div>\r\n<div id=\"content\">\r\n <div class=\"content-container\"><fieldset>\r\n  <h2>502 - Web server received an invalid response while acting as a gateway or proxy server.</h2>\r\n  <h3>There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.</h3>\r\n </fieldset></div>\r\n</div>\r\n</body>\r\n</html>\r\n"
  }
}
 
 
7 REPLIES 7
Highlighted
Community Support Team
Community Support Team

Re: JSON Format error when using 'Get Rows' from SQL

Hi @ niamhks,

 

What action has failed in your flow?

If the error code 502 appears, the failure is temporary or transient.

You could refer to link below to troubleshoot a flow:

https://docs.microsoft.com/en-us/flow/fix-flow-failures

 

 

I have made a test on my side and don’t have the issue that you mentioned.

 

The screenshots of my flow’s configuration as below:

10.png

 

The flow run successfully as below:

 11.png

 

Please Resubmit  the flow again and see if your problem still exists.

 

 

Regards,
Alice Zhang

niamhks
Level: Powered On

Re: JSON Format error when using 'Get Rows' from SQL

Hi, 

 

I have been resubmitting the for around 4 days and i've had luck. Which is why I think there is an issue occuring somewhere

 

flow2.JPG

jfoxbxe
Level: Powered On

Re: JSON Format error when using 'Get Rows' from SQL

Have you gotten this to work? I'm also getting 502, the response is not in a JSON format when using Get Rows:

 

etNAP4Z{
 

 

 "error": {
    "code"502,
    "source""canada-001.azure-apim.net",
    "clientRequestId""1bffae00-0246-4373-bcda-78d612aa10c5",
    "message""The response is not in a JSON format.",
    "innerError""<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>\r\n<title>502 - Web server received an invalid response while acting as a gateway or proxy server.</title>\r\n<style type=\"text/css\">\r\n<!--\r\nbody{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}\r\nfieldset{padding:0 15px 10px 15px;} \r\nh1{font-size:2.4em;margin:0;color:#FFF;}\r\nh2{font-size:1.7em;margin:0;color:#CC0000;} \r\nh3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} \r\n#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:\"trebuchet MS\", Verdana, sans-serif;color:#FFF;\r\nbackground-color:#555555;}\r\n#content{margin:0 0 0 2%;position:relative;}\r\n.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<div id=\"header\"><h1>Server Error</h1></div>\r\n<div id=\"content\">\r\n <div class=\"content-container\"><fieldset>\r\n  <h2>502 - Web server received an invalid response while acting as a gateway or proxy server.</h2>\r\n  <h3>There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.</h3>\r\n </fieldset></div>\r\n</div>\r\n</body>\r\n</html>\r\n"
  }
}

jfoxbxe
Level: Powered On

Re: JSON Format error when using 'Get Rows' from SQL

Turns out my problem was that I just needed to capitalize 'name' in the Filter of Get rows.

bartvd
Level: Powered On

Re: JSON Format error when using 'Get Rows' from SQL

In case someone also encounters this issue.

 

Here, it was also a case problem i had :'Id eq 145', and it was fixed when I entered 'ID eq 145'.

So be carefull you use the exact fieldname.

Shegs
Level: Powered On

Re: JSON Format error when using 'Get Rows' from SQL

I've used a million of these get rows actions in FLOW and this is the first time I truely can't figure this out.

 

I am filtering just like you:

LastModified ge @{body('Subtract_from_time')}

 

but I get:

"message": "The response is not in a JSON format."

 

The spelling and case of LastModified is correct and the Flow runs with eq rather than gt or ge I just get no values since none of the records had that exact date in LastModified.

MaGreeby
Level: Power Up

Re: JSON Format error when using 'Get Rows' from SQL

I was having issues with this also - i was using ColumnName eq -> and having this point to a dynamic property off an email (subject line).

I had to wrap the dynamic property in apostrophes to get it to work. my code looks like this now:

"ColumnName eq '@{triggerBody()?['Subject']}'"
 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 459 members 4,645 guests
Please welcome our newest community members: