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

CurlTransport sends no error code while throwing Exception #209

Closed
kwazaro opened this issue Sep 1, 2020 · 0 comments
Closed

CurlTransport sends no error code while throwing Exception #209

kwazaro opened this issue Sep 1, 2020 · 0 comments
Labels
Milestone

Comments

@kwazaro
Copy link
Contributor

kwazaro commented Sep 1, 2020

What steps will reproduce the problem?

Try to get Exception from Client using CurlTransport (for example, connection timeout).

try {
...
} catch (\yii\httpclient\Exception $e) {
    echo $e->getCode();
}

What's expected?

It is expected to get error code (for example, 28);

What do you get instead?

error code is 0.

Additional info

Q A
Yii version 2.0.37
Yii HTTP Client version 2.0.12.0
PHP version 7.2.29
Operating system Windows 10
@kwazaro kwazaro mentioned this issue Sep 1, 2020
@samdark samdark added this to the 2.0.13 milestone Sep 6, 2020
@samdark samdark added the type:enhancement Enhancement label Sep 6, 2020
@samdark samdark closed this as completed in febac61 Sep 6, 2020
@samdark samdark added type:bug Bug and removed type:enhancement Enhancement labels Sep 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants