[
https://issues.apache.org/jira/browse/THRIFT-4645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16636276#comment-16636276
]
ASF GitHub Bot commented on THRIFT-4645:
----------------------------------------
james-johnston-thumbtack opened a new pull request #1602: THRIFT-4645:
TCurlClient: include failure reason in exception
URL: https://github.com/apache/thrift/pull/1602
When curl_exec fails, more detailed failure information is available by
calling curl_error. Include this error information in the message in the
thrown TTransportException.
Also change the comparison of the return value of curl_exec to explicitly
check for boolean false, so as to distinguish from an empty response body (per
the PHP documentation on this subject).
Changes have been tested and running in production at Thumbtack for the past
several days, and it's working as expected. TCurlClient doesn't seem to have
any existing test suite to update.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> TCurlClient: show actual error message when throwing TTransportException
> ------------------------------------------------------------------------
>
> Key: THRIFT-4645
> URL: https://issues.apache.org/jira/browse/THRIFT-4645
> Project: Thrift
> Issue Type: Improvement
> Components: PHP - Library
> Reporter: James Johnston
> Priority: Minor
>
> The TCurlClient does not create a very informative error message when
> throwing TTransportException. In particular, the PHP "curl_error" function
> is a valuable source of information when "curl_exec" fails, and I think it
> would be highly useful to include that message when throwing
> TTransportException.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)