cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User II
Super User II

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

New Member

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

3 REPLIES 3
Super User II
Super User II

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

New Member

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

Regular Visitor

I am getting similar issue since this morning. My flow was working fine until last night. I have created Approval workflows using Business Central Connector.

 

 

{
"error": {
"code": 502,
"source": "flow-apim-msmanaged-na-eastus2-01.azure-apim.net",
"clientRequestId": "9ef809d5-6414-427d-93cb-15c093375a68",
"message": "BadGateway",
"innerError": {
"status": 500,
"message": "ErrorCode: Unknown Purchase_QuotePurchLines cannot publish Purchase_QuotePurchLines because a different entity with the same name has already been added. CorrelationId: d791b5bb-d821-475b-a52a-dd970e19a507.\r\nclientRequestId: 9ef809d5-6414-427d-93cb-15c093375a68",
"error": {
"message": "ErrorCode: Unknown Purchase_QuotePurchLines cannot publish Purchase_QuotePurchLines because a different entity with the same name has already been added. CorrelationId: d791b5bb-d821-475b-a52a-dd970e19a507."
},
"source": "api.businesscentral.dynamics.com",
"errors": []
}
}
}

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (32,260)