-
Notifications
You must be signed in to change notification settings - Fork 61
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
Emit a warning if HTTP status code implies success but X-Died header has been set #25
base: master
Are you sure you want to change the base?
Conversation
Does anyone have any thoughts on this? |
Since LWP requires HTTP-Message, can we require LWP from HTTP-Message for the test? circular deps problem? |
been set. Test code mostly stolen from @eserte in https://rt.cpan.org/Public/Bug/Display.html?id=101990
I've switched from |
|
Yes, I think so. I could add that.
I'm not a huge fan of it either, but in think in this case it's a hassle to ask people to check two different headers in addition to the response code on each request. What I'd like to do is unmask a hard to debug error. In this case if you check those headers before calling Other options:
OR
I still like the idea of baking this into @autarch, what do you think? |
To be clear, I'm fine with moving this logic outside of this package. I just want it to be easy to use. |
+1 for |
I think a new |
What about |
👍 |
Something like |
I'm concerned about the introduction of extra warnings into users' code. Since this sub is new anyway, we can make it do anything we want -- it might be more clear if we returned false when the X-Died header was set? |
@karenetheridge right, that's what we're talking about here. You can ignore this PR. We're talking about fixing this in |
I don't see any resolution in what about |
It doesn't look like this will be resolved anytime soon. How about updating the docs with an example of how to check for 'X-Died'. Something like:
and maybe offer this simplified solution so users don't have to modify all their existing error checks:
|
Sure! We would accept a doc patch for this. |
Test code mostly stolen from
@eserte in https://rt.cpan.org/Public/Bug/Display.html?id=101990 which is now libwww-perl/libwww-perl#242
I've been lazy with the test. I can clean that up not to use
LWP::UserAgent
if desired. All feedback welcome. I'm happy to change completely.