easyhttp icon indicating copy to clipboard operation
easyhttp copied to clipboard

偶尔报错,不知道哪的问题

Open pengdefang opened this issue 3 years ago • 2 comments

#31 {main}Error: Call to a member function getHeaders() on null in /app/webman/vendor/yzh52521/easyhttp/src/Request.php:3 Stack trace: #0 [internal function]: yzh52521\EasyHttp\Request->yzh52521\EasyHttp{closure}() #1 /app/webman/vendor/yzh52521/easyhttp/src/Logger.php(178): call_user_func() #2 /app/webman/vendor/yzh52521/easyhttp/src/Logger.php(141): yzh52521\EasyHttp\Logger->getLogMessage() #3 /app/webman/vendor/yzh52521/easyhttp/src/Logger.php(244): yzh52521\EasyHttp\Logger->log() #4 /app/webman/vendor/guzzlehttp/promises/src/RejectedPromise.php(42): yzh52521\EasyHttp\Logger->yzh52521\EasyHttp{closu #5 /app/webman/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\RejectedPromise::GuzzleHttp\Promise{ #6 /app/webman/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run() #7 /app/webman/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn() #8 /app/webman/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending() #9 /app/webman/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList() #10 /app/webman/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() #11 /app/webman/vendor/guzzlehttp/guzzle/src/Client.php(187): GuzzleHttp\Promise\Promise->wait() #12 /app/webman/vendor/yzh52521/easyhttp/src/Request.php(497): GuzzleHttp\Client->request() #13 /app/webman/vendor/yzh52521/easyhttp/src/Request.php(364): yzh52521\EasyHttp\Request->request()

pengdefang avatar Dec 05 '22 06:12 pengdefang

升级最新版 试试

yuanzhihai avatar Dec 05 '22 12:12 yuanzhihai

升级最新版 试试

试了最新版本,一样的出现,这个错误要不然try catch怎么捕获?

pengdefang avatar Dec 06 '22 11:12 pengdefang