ovh / csharp-ovh

Thin wrapper around OVH's APIs. Handles all the hard work including credential creation and requests signing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to handle HTTP 204 correctly

imReker opened this issue · comments

commented

Instead of HTTP 200, some APIs return HTTP 204 No Content as success (like PUT /services/{serviceId}/billing/engagement/endRule).
In this situation, 204 will be treated as an error. Since there is no HTTP body, finally a NULL exception will be occurred at Ovh.Api.Client.ExtractExceptionFromHttpResponse
Reference:
https://github.com/ovh/csharp-ovh/blob/16459d3b0699892ebb656df8d548dbf1007a3160/csharp-ovh/Client/Client.cs#L360C1-L361C1