Warning message "BadGateway" and "status : 500" of JSON context for SharePoint "Set Content Approval

Copper Contributor

Hi all, we are using this Flow for SharePoint Library approval process. However once workflow completed there was a warning message "BadGateway" and "status : 500" of JSON context for SharePoint "Set Content Approval Status To Approve" as attached image clip.

And the "revision" on library webpage of SharePoint of this document kept as "Draft" and not changed to like 1.1.

If any of members can comment, thank you.

4 Replies

Hi @Michael WANG,

 

Did you set the Document Library Versioning Settings correctly?

Capture.PNG

 

I would not expect the version number to change, only the "Approval Status".

Capture1.PNG

 

I hope this helps.

 

Norm

Hi, @Norman Young 

I did have these setting as attached image and if there could be any other setting that I should check?SharePoint revison setting.PNG

 

Hi @Michael WANG,

 

If you are still getting the warning message please share a screen shot of the error and of the Flow.

 

Norm

HI @Norman Young ,

I wonder if the RESTful API result of "set content approval status to approve" is correct so I compile the key-value pairs below in a table and if you can help to diagnose.

keyvalue
X-SharePointHealthScore0
X-MS-SPConnector1
X-SP-SERVERSTATEReadOnly=0
DATASERVICEVERSION3.0
SPClientServiceRequestDuration1234
SPRequestGuidd16561c5-4097-4f5e-984e...
request-idd16561c5-4097-4f5e-984e...
MS-CVxWFl0ZdAXk+YTlVibJIwoQ.0
Strict-Transport-Securitymax-age=31536000
X-FRAME-OPTIONSSAMEORIGIN
MicrosoftSharePointTeamServices(I ignore the address here)
X-Content-Type-Optionsnosniff
X-MS-InvokeApp1; RequireReadOnly
Timing-Allow-Origin
*
x-ms-apihub-cached-responsetrue
Cache-Controlmax-age=0, private
DateSun, 29 Sep 2019 05:18:06 ...
P3PCP="ALL IND DSP COR AD...
X-AspNet-Version4.0.30319
X-Powered-ByX-Powered-By
Content-Length467
Content-Typeapplication/json
ExpiresSat, 14 Sep 2019 05:18:06...
Last-ModifiedSun, 29 Sep 2019 05:18:06...

also the JSON content as below:

 

{
  "error": {
    "code": 502,
    "source": "flow-apim-europe-001-francecentral-01.azure-apim.net",
    "clientRequestId": "d16561c5-4097-4f5e-984e-55626c9230a1",
    "message": "BadGateway",
    "innerError": {
      "status": 500,
      "message": "項目的目前狀態是「Draft」,因此無法實作後續動作Approve\r\nclientRequestId: d16561c5-4097-4f5e-984e-55626c9230a1\r\nserviceRequestId: d16561c5-4097-4f5e-984e-55626c9230a1"
    }
  }
}

 

The Chinese section might be similar to "The current state of the item is Draft and the following action Approval cannot be implemented Approve\r\nclientRequestId: d16561c5-4097-4f5e-984e-55626c9230a1\r\nserviceRequestId: d16561c5-4097-4f5e-984e-55626c9230a1".

I also attach some related cases and links here for reference.