Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Api.php) : handle 204 no content response in decodeResponse #141

Closed
wants to merge 2 commits into from

Conversation

OctaYann
Copy link

Context:

Ovh api now send a 204 no content response when you call /domain/zone/{zoneName}/refresh endpoint.

Problem:

Api.php\decodeResponse method throw a error by default when it fail to decode json, and so when you pass empty string from no content reponse

Proposal:

ruturn empty array when response has code 204 or body length is 0

All tests are passing, hope this can be merged fast.

Thanks !

@OctaYann
Copy link
Author

I'm referencing to this issue #140

Signed-off-by: OctaYann <yann@octacom.fr>
@deathiop
Copy link
Contributor

Hi there,
Thank you for your contribution!

This ended up handled in #142 (returning null instead of [], with tests).
Therefore, I'm closing this one.

@deathiop deathiop closed this Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants