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

Log response body when failing to download http sources #21964

Open
chris-smith-zocdoc opened this issue Feb 17, 2025 · 0 comments
Open

Log response body when failing to download http sources #21964

chris-smith-zocdoc opened this issue Feb 17, 2025 · 0 comments
Labels
diagnostics Poor diagnostics, error messages that could be improved enhancement

Comments

@chris-smith-zocdoc
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Sometimes http_source sources are unreliable and may produce 5xx responses, or clients may configure the wrong credentials resulting in a 4xx response. Pants makes this difficult to troubleshoot right now because only the status code is logged under debug logger.

Describe the solution you'd like
In the event of a error response, log the complete response body

Additional context
Related to #21955 where S3 produces a detailed error response, but its not visible the pants output.

In the case of S3, it might look something like

<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>User: foo is not authorized to perform: s3:GetObject on resource: "arn::..." because no identity-based policy allows the s3:GetObject action</Message><RequestId>123</RequestId><HostId>456</HostId></Error>
@huonw huonw added the diagnostics Poor diagnostics, error messages that could be improved label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagnostics Poor diagnostics, error messages that could be improved enhancement
Projects
None yet
Development

No branches or pull requests

2 participants