cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

BadGateway error 502

I'm trying to get the image attachment from CRM Note entity and resize the image, but the flow is getting the BadGateway error when running resize. please see the below information. Please help

 
 
 
 
 
 
 
 
 
 
 
 

2020-09-24_21h48_34.png

 

2020-09-24_21h49_41.png

 

 
 

 

 

 

 

Body

{
  "error": {
    "code"502,
    "source""australia-001.azure-apim.net",
    "clientRequestId""b1eaf79a-269f-4043-92a8-f99ac87f6578",
    "message""BadGateway",
    "innerError": {
      "HttpStatusCode"500,
      "HttpStatusMessage""An error occurred processing the request",
      "OperationId"null,
      "Errors": [
        "An error occurred executing the specified image resize operation."
      ],
      "Operation Status""Error",
      "Filename"null,
      "FileContent"null
    }
  }
}
 
Header
 
{
  "Request-Context""appId=cid-v1:4f24fb98-845b-4c7d-8f1e-e629ebb10cb5",
  "api-supported-versions""1.0",
  "X-Azure-Ref""0s4NsXwAAAABPGO1xifeZQqRvP4Afg9q3TUVMMDFFREdFMDEyMQAzOTcwZDFlNS1kODBiLTQ2NWEtYjM1Yi0wNzBjMDE2ZWU0NzI=",
  "Timing-Allow-Origin""*",
  "x-ms-apihub-cached-response""true",
  "Date""Thu, 24 Sep 2020 11:32:05 GMT",
  "X-Powered-By""ASP.NET",
  "Content-Length""534",
  "Content-Type""application/json"
}
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III

Re: BadGateway error 502

hi @ChloeL  that is an api error from Encodian service I suggest you to contact them to see what is happening. Normally this kind of errors are quick solved and temporaries.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Highlighted
New Member

Re: BadGateway error 502

In case anyone else is experiencing this same issue, here's the solution...

It's about how files get stored in note attachments in CDS (not an error with Power Automate or Encodian's action/service/connector).

In the File Content input within the Resize an Image action, you'll need to wrap that Document field in a bas64ToBinary expression like so:

base64ToBinary(triggerOutputs()?['body/documentbody'])

...and make sure you add this via the expression editor or it won't work. Ever since I made that change, the flow has been flawless an the Encodian action is surprisingly fast.

 

Full disclosure - I didn't figure that out by myself, I contacted Encodian support who were absolutely excellent and had my issue resolved in no time. 10/10 for service 👏

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: BadGateway error 502

hi @ChloeL  that is an api error from Encodian service I suggest you to contact them to see what is happening. Normally this kind of errors are quick solved and temporaries.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Highlighted
New Member

Re: BadGateway error 502

In case anyone else is experiencing this same issue, here's the solution...

It's about how files get stored in note attachments in CDS (not an error with Power Automate or Encodian's action/service/connector).

In the File Content input within the Resize an Image action, you'll need to wrap that Document field in a bas64ToBinary expression like so:

base64ToBinary(triggerOutputs()?['body/documentbody'])

...and make sure you add this via the expression editor or it won't work. Ever since I made that change, the flow has been flawless an the Encodian action is surprisingly fast.

 

Full disclosure - I didn't figure that out by myself, I contacted Encodian support who were absolutely excellent and had my issue resolved in no time. 10/10 for service 👏

View solution in original post

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (4,724)