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

API endpoints started returning 204 for No Content but client throws error

Open mcdado opened this issue 2 years ago • 1 comments

The client expects response http code 200 but some endpoints (in my case domain zone refresh) started returning 204:

https://github.com/ovh/node-ovh/blob/06d61afd5e21c9872b80de2695f13ef2be1b8ae8/lib/ovh.es5.js#L197

https://github.com/ovh/node-ovh/blob/06d61afd5e21c9872b80de2695f13ef2be1b8ae8/lib/ovh.es6.js#L176

Should be res.statusCode >= 400

mcdado avatar Oct 24 '23 19:10 mcdado

I did a very quick search, didn't see that I'm referring to another call. Either way, the recently merge #50 is not published yet to npm, so the issue is still active.

mcdado avatar Oct 24 '23 19:10 mcdado

Yep, I don't know why they haven't published it yet. I have to wrap all my calls that can potentially return 204s until then.

Clovel avatar Sep 20 '24 09:09 Clovel

Package is now published under a new name (@ovhcloud/node-ovh). Patch has been included in the 3.0.0 release https://www.npmjs.com/package/@ovhcloud/node-ovh/v/3.0.0

marie-j avatar Sep 20 '24 14:09 marie-j