Skip to content

Fix #12: Improve exception handling information in ScanTarget #46

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ic0ns
Copy link
Contributor

@ic0ns ic0ns commented Jun 23, 2025

Summary

  • Added exception message retention when UnknownHostException occurs
  • Implemented tracking of denylist reasons (domain vs IP) for better diagnostics
  • Created helper method to determine specific denylist causes

Changes

  • Added unresolvedReason field to store exception messages when host resolution fails
  • Added denylistReason field to track why a target was denylisted
  • Implemented determineDenylistReason() method to distinguish between domain and IP denylisting
  • Added corresponding getters and setters for the new fields

Test plan

  • Compiled and tested with mvn clean test
  • Code formatting verified with mvn spotless:apply
  • Manual testing of exception information retention
  • Manual testing of denylist reason tracking

This addresses issue #12 by retaining diagnostic information that was previously discarded, improving debugging capabilities for failed host resolutions and denylisted targets.

- Store UnknownHostException message when host resolution fails
- Track denylist reason (domain vs IP) for better diagnostics
- Add helper method to determine specific denylist cause
- Add getters/setters for new diagnostic fields

This addresses issue #12 by retaining diagnostic information
that was previously discarded, improving debugging capabilities.
@ic0ns
Copy link
Contributor Author

ic0ns commented Jun 23, 2025

looks good but I want to see tests

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.

1 participant