xendit / xendit-php

Xendit REST API Client for PHP - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets Services, xenPlatforms
https://developers.xendit.co/api-reference/
MIT License
153 stars 76 forks source link

http response include !200 about Fatal error by v2.10.0 #160

Closed windqiu closed 2 years ago

windqiu commented 2 years ago

Hi~ we got this error from plugin

7#7: *23140 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Xendit\Exceptions\ApiException::__construct(), 1 passed in /vendor/xendit/xendit-php/src/Exceptions/ApiException.php on line 50 and exactly 3 expected in /vendor/xendit/xendit-php/src/Exceptions/ApiException.php:47 Stack trace:

0 /vendor/xendit/xendit-php/src/Exceptions/ApiException.php(50): Xendit\Exceptions\ApiException->__construct('Unknown Xendit\...')

1 /vendor/xendit/xendit-php/src/HttpClient/GuzzleClient.php(171): Xendit\Exceptions\ApiException->__construct(NULL, '503', NULL)

2 /vendor/xendit/xendit-php/src/HttpClient/GuzzleClient.php(144): Xendit\HttpClient\GuzzleClient::_handleAPIError(Array)

3 /vendor/xendit/xendit-php/src/HttpClient/GuzzleClient.php(90): Xendit\HttpClient\GuzzleClient->_executeRequest(Array, '/ewallets/charg...')

4 /vendor/xendit/xendit-php/src/ApiRequestor.php(84): Xendit\HttpClient\GuzzleClie in /vendor/xendit/xendit-php/src/Exceptions/ApiException.php on line 47" while reading response header from upstream

luminto17 commented 2 years ago

Hi @windqiu , thanks for the report!

Can we ask to share what action did you do before getting this error? If you were making an API request, can you share which product and what is the request payload, so we can troubleshoot on our logs?

Thanks!

windqiu commented 2 years ago

Hi~ I can tell u about error from api,but payload cant send. api: GET ewallets/charges/{id} POST ewallets/charges

we got this error when we send the api, then it response 500 or 503 code that cant not be handle corrently. show your code var $message or $rcode get NULL __construct cant handle NULL var

question: have any other version can replace for current v2.10.0 ? we have to ensure not having a big bug from another code, pls ~ Thanks!

@.***

From: Luminto Date: 2021-12-02 10:42 To: xendit/xendit-php CC: Jwindqiu; Mention Subject: Re: [xendit/xendit-php] http response include !200 about Fatal error by v2.10.0 (Issue #160) Hi @windqiu , thanks for the report! Can we ask to share what action did you do before getting this error? If you were making an API request, can you share which product and what is the request payload, so we can troubleshoot on our logs? Thanks! — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

xen-HendryZheng commented 2 years ago

Hi @windqiu Could you try the latest release here : https://github.com/xendit/xendit-php/releases/tag/2.16.0

This should solve the problem.