Forum Discussion
Warning message "BadGateway" and "status : 500" of JSON context for SharePoint "Set Content Approval
Did you set the Document Library Versioning Settings correctly?
I would not expect the version number to change, only the "Approval Status".
I hope this helps.
Norm
- michaelwangRaritanSep 26, 2019Copper Contributor
Hi, Norman Young
I did have these setting as attached image and if there could be any other setting that I should check?
- Norman YoungSep 26, 2019MVP
If you are still getting the warning message please share a screen shot of the error and of the Flow.
Norm
- michaelwangRaritanSep 29, 2019Copper Contributor
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.
key value X-SharePointHealthScore 0 X-MS-SPConnector 1 X-SP-SERVERSTATE ReadOnly=0 DATASERVICEVERSION 3.0 SPClientServiceRequestDuration 1234 SPRequestGuid d16561c5-4097-4f5e-984e... request-id d16561c5-4097-4f5e-984e... MS-CV xWFl0ZdAXk+YTlVibJIwoQ.0 Strict-Transport-Security max-age=31536000 X-FRAME-OPTIONS SAMEORIGIN MicrosoftSharePointTeamServices (I ignore the address here) X-Content-Type-Options nosniff X-MS-InvokeApp 1; RequireReadOnly Timing-Allow-Origin * x-ms-apihub-cached-response true Cache-Control max-age=0, private Date Sun, 29 Sep 2019 05:18:06 ... P3P CP="ALL IND DSP COR AD... X-AspNet-Version 4.0.30319 X-Powered-By X-Powered-By Content-Length 467 Content-Type application/json Expires Sat, 14 Sep 2019 05:18:06... Last-Modified Sun, 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 https://powerusers.microsoft.com/t5/General-Flow-Discussion/Set-Content-Approval-Status-Action-works-as-expected-but-always/m-p/369876#M31166 and https://docs.microsoft.com/zh-tw/connectors/sharepointonline/#set-content-approval-status here for reference.