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

Echo port number in error message #170

Merged
merged 2 commits into from
May 30, 2023
Merged

Echo port number in error message #170

merged 2 commits into from
May 30, 2023

Conversation

roobre
Copy link
Collaborator

@roobre roobre commented May 29, 2023

Description

When attempting to fault inject a service listening on port 8080, the disruptor fails with the following message:

ERRO[0006] GoError: error injecting fault: error invoking agent: command terminated with exit code 1
the DestinationPort and RedirectPort must be different

However, this error is not very actionable, as most likely the user has specified neither of those. By echoing the port numbers, we give the user some more context about which port is colliding.

Checklist:

  • My code follows the coding style of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works.
  • Any dependent changes have been merged and published in downstream modules

Copy link
Collaborator

@pablochacin pablochacin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pablochacin pablochacin changed the title iptables: echo port number in error message Echo port number in error message May 29, 2023
@roobre roobre requested a review from pablochacin May 29, 2023 13:53
@roobre
Copy link
Collaborator Author

roobre commented May 29, 2023

@pablochacin I split the error line to make the linter happy, LMK if you like this style or you prefer any other

@roobre roobre merged commit a25b781 into main May 30, 2023
6 checks passed
@roobre roobre deleted the port-in-error-msg branch May 30, 2023 08:23
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.

None yet

2 participants