cloudconvert / cloudconvert-php

CloudConvert PHP SDK
https://cloudconvert.com/api/v2
MIT License
222 stars 84 forks source link

HTTP response code error when I upload a file to cloudConvert #72

Closed migueliriano closed 4 years ago

migueliriano commented 4 years ago

A few hours ago I started getting an error when I try to convert a file using the library, it looks like cloudConvert API changed the response code when we upload a file and now the library is triggering an error, this is the error exception:

CloudConvert\Exceptions\HttpServerException: Unknown HTTP response code ("204") received from the API server

vendor\cloudconvert\cloudconvert-php\src\Exceptions\HttpServerException.php:39
vendor\cloudconvert\cloudconvert-php\src\Transport\HttpTransport.php:258
vendor\cloudconvert\cloudconvert-php\src\Transport\HttpTransport.php:226
vendor\cloudconvert\cloudconvert-php\src\Transport\HttpTransport.php:202
vendor\cloudconvert\cloudconvert-php\src\Resources\TasksResource.php:111

I confirmed that the Job is created on cloudConvert API and completed, all point that the error is with the library that can't handle this new response code.

migueliriano commented 4 years ago

Now the library is working again, it looks like was a momentary error with cloudConvert API with the HTTP response code, maybe you can consider covering this case for future issues.

josiasmontag commented 4 years ago

Fixed by https://github.com/cloudconvert/cloudconvert-php/commit/8d99d1ab3f0516f8cbcd4e41fef24376812e3548