204 not handled correctly for long-running operations
mikhailshilkov opened this issue · comments
Mikhail Shilkov commented
I'm invoking this endpoint for private endpoint connections but it returns 204 (no content) and the invocation fails with an obscure "autorest/azure: error response cannot be parsed: "" error: EOF".
It's likely I miss some other resource that is required for the successful operation, but I'd love to see a more obvious message about what went wrong.
Is that a service bug or should the library handle this use case with a user-friendly error?
Request-response log:
PUT /subscriptions/sub/resourceGroups/rg83b5fa91/providers/Microsoft.DBforPostgreSQL/servers/server9087158b/privateEndpointConnections/pec?api-version=2018-06-01 HTTP/1.1
Content-Type: application/json; charset=utf-8
{"properties":{"privateLinkServiceConnectionState":{"description":"For private connectivity from Self-Hosted Pulumi Service.","status":"Approved"}}}
HTTP/1.1 204 No Content
Content-Length: 0
GET https://management.azure.com/subscriptions/sub/resourceGroups/rg83b5fa91/providers/Microsoft.DBforPostgreSQL/servers/server9087158b/privateEndpointConnections/pec?api-version=2018-06-01
HTTP/1.1 204 No Content
Content-Length: 0
GET https://management.azure.com/subscriptions/subresourceGroups/rg83b5fa91/providers/Microsoft.DBforPostgreSQL/servers/server9087158b/privateEndpointConnections/pec?api-version=2018-06-01
HTTP/1.1 204 No Content
Content-Length: 0