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

Make error messages more descriptive and user friendly #231

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

saurabhbhatia-stripe
Copy link

@saurabhbhatia-stripe saurabhbhatia-stripe commented Sep 30, 2024

Improve error messages to be more descriptive and user friendly.

Testing Details

DNS Resolution Failure

HTTPS_PROXY=localhost:4750 curl https://abccda.com 

Logs:

{"id":"crt8k5qf8flecbs1t3qg","inbound_remote_addr":"[::1]:51673","level":"error","msg":"DNS resolution failed for 'abccda.com:443'. This could be due to an incorrect hostname or DNS issues. Error Details: lookup abccda.com: no such host","proxy_type":"connect","requested_host":"abccda.com:443","start_time":"2024-09-30T11:23:03.39828Z","time":"2024-09-30T16:53:03+05:30","trace_id":""}
{"allow":true,"content_length":149,"decision_reason":"host matched allowed domain in rule","dns_lookup_time_ms":151,"enforce_would_deny":false,"error":"lookup abccda.com: no such host","id":"crt8k5qf8flecbs1t3qg","inbound_remote_addr":"[::1]:51673","level":"error","msg":"CANONICAL-PROXY-DECISION","proxy_type":"connect","requested_host":"abccda.com:443","start_time":"2024-09-30T11:23:03.39828Z","time":"2024-09-30T16:53:03+05:30","trace_id":""}

Timeout Failure

 HTTPS_PROXY=localhost:4750 curl https://localhost.com
 

Logs

{"allow":true,"decision_reason":"host matched allowed domain in rule","dns_lookup_time_ms":11,"enforce_would_deny":false,"id":"crt8pvaf8flecbs1t3r0","inbound_remote_addr":"[::1]:52498","level":"info","msg":"CANONICAL-PROXY-DECISION","project":"security","proxy_type":"connect","requested_host":"localhost.com:443","role":"","start_time":"2024-09-30T11:35:25.314705Z","time":"2024-09-30T17:05:25+05:30","trace_id":""}
{"conn_establish_time_ms":75000,"id":"crt8pvaf8flecbs1t3r0","inbound_remote_addr":"[::1]:52498","level":"error","msg":"Connection to remote host 'localhost.com:443' timed out. This could be due to network issues or the remote host being down. Error Details: dial tcp 74.125.224.72:443: connect: operation timed out","project":"security","proxy_type":"connect","requested_host":"localhost.com:443","role":"","start_time":"2024-09-30T11:35:25.314705Z","time":"2024-09-30T17:06:40+05:30","trace_id":""}

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11105105422

Details

  • 3 of 4 (75.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 54.389%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/smokescreen/smokescreen.go 3 4 75.0%
Totals Coverage Status
Change from base Build 10911749373: -0.02%
Covered Lines: 1425
Relevant Lines: 2620

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants