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

Error Message #77

Open
nadar opened this issue Apr 23, 2021 · 3 comments
Open

Error Message #77

nadar opened this issue Apr 23, 2021 · 3 comments
Assignees
Milestone

Comments

@nadar
Copy link
Member

nadar commented Apr 23, 2021

The library provides to many error message properties. They need either a better documentation or we should provide the user an error message function which returns the right message. The following error message properties are available:

  • curl_error_message
  • http_error_message
  • error_message
  • getErrorMessage()

I assume that error_message contains the what users are looking for, either its a curl error or a http request error but there is also getErrorMessage() which is equals to curl_error_message.

What could we do to improve the developer experience?

@amouhzi
Copy link
Member

amouhzi commented Apr 28, 2021

I think what needs to be done is just improve the documentation, because I think we should keep this library lightweight for applications that use it. Improving the developer experience requires a lot of refactoring and implementation of some PSRs, which involves breaking changes and doing a major release, which takes time and effort. Right now, I'm running out of time to do this work. But I'm not against Pull Requests for that.

@nadar
Copy link
Member Author

nadar commented May 4, 2021

Improving the docs sounds good to me. I totally agree with lightweight experience of the library, also therefore i don't think its NOT necessary to implement PSR's, as there are ton's of other libraries which does this already.

so in order to always get an error message, people must use the $error_message property, right? Maybe you could explain the differences i asked, i will do a PR afterwards. Maybe introducing a new method, and deprecating getErrorMessage().

@nadar
Copy link
Member Author

nadar commented Jul 29, 2022

@amouhzi i stumbled on this again by myself in a project. There are so many error retrieving options that i am still not sure, what to use to get the latest proper error message.

Maybe we could introduce in 3.0:

  • getErrorMessage(): rename to getCurlClientErrorMessage()
  • getErrorMessage(): Using the value of $error_message

This should not be a big problem, since developers get better error messages after that change.

@nadar nadar added this to the 3.0 milestone Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants