Help the user understand why HTTP fails#4
Closed
briandfoy wants to merge 7 commits into
Closed
Conversation
First, list in the docs all the steps that HTTP::Tiny takes to find the cert file. Second, when HTTP::Tiny tried something and gave up, tell the user what it tried.
Author
|
If no one wants to act on this PR, I'll close it. |
abraxxa
suggested changes
Oct 13, 2023
|
Can we get these improvements merged? 🙏🏻 |
Author
|
It's been awhile, so here's the patch file in case I delete my fork. Typically, I don't let these things linger because it makes a mess of the things I have to track. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)