csharp-ovh icon indicating copy to clipboard operation
csharp-ovh copied to clipboard

Unable to handle HTTP 204 correctly

Open imReker opened this issue 1 year ago • 0 comments

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

imReker avatar Jul 14 '23 05:07 imReker