I'm building a flow to create a SP library but the response is 502 Bad Gateway. It seems to affect libraries created on this particular subsite as when creating on root or other subsites the error is not present. I suspect something to do with content types / policy issue but the error is not clear and I'm out of ideas.
Update: Forgot to mention; the library is still successfully created. However instead of a 200 I get the 502 and so the flow breaks at that point onward and is marked as Failed.
The Input
{
"host": {
"connectionReferenceName": "shared_sharepointonline",
"operationId": "HttpRequest"
},
"parameters": {
"dataset": "https://xxx.sharepoint.com/sites/project_xxx/XSS Documentation",
"parameters/method": "POST",
"parameters/uri": "_api/web/lists",
"parameters/headers": {
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json"
},
"parameters/body": "{\n \"AllowContentTypes\": false,\n \"BaseTemplate\": 101,\n \"ContentTypesEnabled\": false,\n \"Description\": \"This is a SharePoint library called \",\n \"Title\": \"test4\"\n}"
},
"retryPolicy": {
"type": "None"
}
}
Output
{
"statusCode": 502,
"headers": {
"Cache-Control": "no-store, no-cache",
"Pragma": "no-cache",
"Set-Cookie": "ARRAffinity=xxx;Path=/;HttpOnly;Secure;Domain=sharepointonline-ae.azconn-ae-001.p.azurewebsites.net,ARRAffinitySameSite=c3e56c5cc8f2059e9ca5b31ea6306f0b4d439389925f19007ee442dc2004e749;Path=/;HttpOnly;SameSite=None;Secure;Domain=sharepointonline-ae.azconn-ae-001.p.azurewebsites.net",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"x-ms-datasourceerror": "True",
"x-ms-request-id": "c8d726a1-00a4-3000-3bed-2726117c4bda",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "false",
"x-ms-apihub-obo": "false",
"Date": "Thu, 09 May 2024 03:05:00 GMT",
"Content-Length": "621",
"Content-Type": "application/json",
"Expires": "-1"
},
"body": {
"error": {
"code": 502,
"source": "australia-001.azure-apim.net",
"clientRequestId": "28dc4028-1252-4197-b23e-ae3ef143724d",
"message": "BadGateway",
"innerError": {
"status": 502,
"message": "Exception from HRESULT: 0x8107140F\r\nclientRequestId: 28dc4028-1252-4197-b23e-ae3ef143724d\r\nserviceRequestId: c8d726a1-00a4-3000-3bed-2726117c4bda",
"source": "https://xxx.sharepoint.com/sites/project_xxx/XSS%20Documentation/_api/web/lists",
"errors": [
"-2130242545",
"Microsoft.SharePoint.SPException"
]
}
}
}
}