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

InvalidArgumentException: Status code must be an integer value between 1xx and 5xx. in file Laravel #20

Closed
gerikurniawan opened this issue Sep 17, 2020 · 8 comments

Comments

@gerikurniawan
Copy link

gerikurniawan commented Sep 17, 2020

Something happen when i use imagekit.io on laravel, anyone can helpme?

@imagekitio
Copy link
Contributor

This looks more related to the underlying API response. Can you share the minimum steps to reproduce this error?

@gerikurniawan
Copy link
Author

ssin

and the full error :

@gerikurniawan
Copy link
Author

InvalidArgumentException: Status code must be an integer value between 1xx and 5xx. in file C:\wamp64\www\backendkompetisi\vendor\guzzlehttp\psr7\src\Response.php on line 151

#0 C:\wamp64\www\backendkompetisi\vendor\guzzlehttp\psr7\src\Response.php(98): GuzzleHttp\Psr7\Response->assertStatusCodeRange(0)
#1 C:\wamp64\www\backendkompetisi\vendor\imagekit\imagekit\src\ImageKit\Resource\GuzzleHttpWrapper.php(178): GuzzleHttp\Psr7\Response->__construct(0, Array, '')
#2 C:\wamp64\www\backendkompetisi\vendor\imagekit\imagekit\src\ImageKit\Resource\GuzzleHttpWrapper.php(89): ImageKit\Resource\GuzzleHttpWrapper->handleRequestException(Object(GuzzleHttp\Exception\RequestException))
#3 C:\wamp64\www\backendkompetisi\vendor\imagekit\imagekit\src\ImageKit\Upload\Upload.php(31): ImageKit\Resource\GuzzleHttpWrapper->postMultipart()
#4 C:\wamp64\www\backendkompetisi\vendor\imagekit\imagekit\src\ImageKit\ImageKit.php(123): ImageKit\Upload\Upload->uploadFileRequest(Array, Object(ImageKit\Resource\GuzzleHttpWrapper))
#5 C:\wamp64\www\backendkompetisi\app\Http\Controllers\MasterProductController.php(54): ImageKit\ImageKit->uploadFiles(Array)
#6 [internal function]: App\Http\Controllers\MasterProductController->store(Object(Illuminate\Http\Request))
#7 C:\wamp64\www\backendkompetisi\vendor\laravel\framework\src\Illuminate\Routing\Controller.php(54): call_user_func_array(Array, Array)
#8 C:\wamp64\www\backendkompetisi\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('store', Array)

@putera
Copy link

putera commented Sep 17, 2020

I got the same error here. But i am not using Laravel. just basic stuff and yet still got error.. please help.

Error code

Fatal error: Uncaught InvalidArgumentException: Status code must be an integer value between 1xx and 5xx.

...\public\vendor\guzzlehttp\psr7\src\Response.php on line 151

@gerikurniawan
Copy link
Author

This looks more related to the underlying API response. Can you share the minimum steps to reproduce this error?

is there something wrong with my code?

@VconexID
Copy link

hello @gerikurniawan do you find any solution?

@hasan-almujtaba
Copy link

also happen to me, using laravel 8.

@gausoft
Copy link

gausoft commented Mar 10, 2022

It's may related to Guzzle version, you can apply a patch in composer.json as mentioned here

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

No branches or pull requests

6 participants