问题
We have some production code that deletes an existing subscription in certain cases. We started getting a HTTP 308 response to certain DELETE requests but we can't identify why this is occurring or what the relevance of the 308 is. There doesn't seem to be any information on a 308 in the Graph Docs; HTTP specs indicates this is a permanent redirect. There is no location header provided.
Our request is pretty simple:
DELETE https://graph.microsoft.com/v1.0/subscriptions/c9ec8a0f-0c9d-492c-90a8-2b0bb96b11d8
We included the content type and the Authorization header. The response in full:
HTTP/1.1 308
Cache-Control: private
Content-Type: text/plain
request-id: 4430ff3b-3eff-44c6-aafc-1527cd01817b
client-request-id: 4430ff3b-3eff-44c6-aafc-1527cd01817b
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"South Central US","Slice":"SliceC","Ring":"3","ScaleUnit":"000","RoleInstance":"AGSFE_IN_20"}}
Strict-Transport-Security: max-age=31536000
Date: Tue, 11 Aug 2020 12:04:17 GMT
Content-Length: 0
There is no error object or code that I can see as indicated by MS Graph Errors page. We have seen this error several thousand times but seems to be specific to certain subscriptions. I'm not sure where to go with this.
来源:https://stackoverflow.com/questions/63428828/microsoft-graph-subscription-api-started-returning-http-308-with-no-location