Help the user understand why HTTP fails #4
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I ran into a hiccup where something using HTTP::Tiny found a wrong SSL_CERT_FILE environment variable I had. After setting up a new machine with the latest OpenSSL, that file ended up under a different prefix without updating the environment.
HTTP::Tiny can do more to track down this sort of error.
First, in the docs that lay out how HTTP::Tiny finds the cert file, it missed the first step (SSL_options), and also didn't say that a defined but missing SSL_CERT_FILE would stop the process. I fixed that.
I also improved the error message a little so people will know in which step HTTP::Tiny failed.
I don't particularly care about how I typed it out, so change it as appropriate for whatever other concerns you have.
Some previous threads (chansen/p5-http-tiny#151, chansen/p5-http-tiny#152, metacpan/MetaCPAN-Client#117, metacpan/MetaCPAN-Client#82)