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

Can the error output of API response 400 be ignored? #31

Open
wartw opened this issue Feb 29, 2024 · 2 comments
Open

Can the error output of API response 400 be ignored? #31

wartw opened this issue Feb 29, 2024 · 2 comments

Comments

@wartw
Copy link

wartw commented Feb 29, 2024

Can the error output of API response 400 be ignored?
This affects other CODE operations

@victorantoniak
Copy link

Change file:
vendor\binance\binance-connector-php\src\Binance\APIClient.php

private function buildClient($httpRequest)
{
$this->httpRequest = $httpRequest ??
new \GuzzleHttp\Client([
'base_uri' => $this->baseURL,
'headers' => [
'Content-Type' => 'application/json',
'X-MBX-APIKEY' => $this->key,
'User-Agent' => 'binance-connect-php'
],
'timeout' => $this->timeout
]);
}

change to
private function buildClient($httpRequest)
{
$this->httpRequest = $httpRequest ??
new \GuzzleHttp\Client([
'base_uri' => $this->baseURL,
'headers' => [
'Content-Type' => 'application/json',
'X-MBX-APIKEY' => $this->key,
'User-Agent' => 'binance-connect-php'
],
'timeout' => $this->timeout,
'http_errors' => false
]);
}

@mbunal
Copy link

mbunal commented Sep 8, 2024

can't we add this as a parameter so it's easier to use.

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

3 participants