Skip to content
This repository has been archived by the owner on Feb 12, 2025. It is now read-only.

204 not handled correctly for long-running operations #628

Closed
mikhailshilkov opened this issue May 3, 2021 · 1 comment
Closed

204 not handled correctly for long-running operations #628

mikhailshilkov opened this issue May 3, 2021 · 1 comment

Comments

@mikhailshilkov
Copy link

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
@jhendrixMSFT
Copy link
Member

These modules are no longer supported, see https://github.com/Azure/go-autorest?tab=readme-ov-file#migrating-to-supported-sdks for more info.

From the error, I believe you want the armpostgresql SDK.

@jhendrixMSFT jhendrixMSFT closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants