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

Splunk: Bugfix: Improve error logging logic #23

Merged
merged 3 commits into from Sep 6, 2022
Merged

Conversation

Trek333
Copy link
Contributor

@Trek333 Trek333 commented Aug 18, 2022

Please ensure your pull request (PR) adheres to the following guidelines:

  • Please refer to our contributing documentation for any questions on submitting a pull request, link: Contribution Guide

Pull Request Checklist

Please check if your PR fulfills the following requirements:

  • Testing of all the changes has been performed (for bug fixes / features)
  • The readme.html has been reviewed and added / updated if needed (for bug fixes / features)
  • Use the following format for the PR description: <App Name>: <PR Type> - <PR Description>
  • Provide release notes as part of the PR submission which describe high level points about the changes for the upcoming GA release.
  • [] Verify all checks are passing.
  • Do NOT use the next branch of the forked repo. Create separate feature branch for raising the PR.
  • Do NOT submit updates to dependencies unless it fixes an issue.

Pull Request Type

Please check the type of change your PR introduces:

  • New App
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Documentation
  • Other (please describe):

Security Considerations (REQUIRED)

  • If you are exposing any endpoints using a REST handler,
    please document them in the readme.html.
  • If this is a new connector or you are adding new actions
    • Please document in the readme.html all methods (eg, OAuth) used to authenticate
      with the service that the connector is integrating with.
    • If any actions are unable to run on SOAR Cloud, please document this in the readme.html.
  • Are you introducing any new cryptography modules? If yes, please elaborate their purpose:
  • Are you are accessing the file system? If yes, please verify that you are only accessing paths returned through
    the Vault API.
  • Are you are marking code to be ignored by Semgrep with nosemgrep?
    If yes, please provide justification in an additional comment next to the ignored code.

Release Notes (REQUIRED)

  • Provide release notes as part of the PR submission which describe high level points about the changes for the upcoming GA release.
    Completed - see the unreleased.md

What is the current behavior? (OPTIONAL)

  • Describe the current behavior that you are modifying.
    A string constant is being used for the error message due to a reoccurring exception in the logic of the _get_error_message_from_exception method. This string constant provides no useful info to troubleshoot the cause of the exception that triggered the call of the _get_error_message_from_exception method.

What is the new behavior? (OPTIONAL)

  • Describe the behavior or changes that are being added by this PR.
    Example logged error strings are below without and with code change. The example below is due to a load balancer for a Splunk Enterprise Search Head Cluster changing the Search Head server during a session which appears to be due to the open issue All Set-Cookie responses incorrectly assumed to be auth cookies # 438 for the Splunk Enterprise Python SDK.

Logged error string example without code change
“Failed to connect to splunk server. Error Code: Error code unavailable. Error Message: Error message unavailable. Please check the asset configuration and|or action parameters.”

Logged error string example with code change
Failed to connect to splunk server. Error Code: Error code unavailable. Error Message: HTTP Error 401: Unauthorized (1142)

Other information (OPTIONAL)

  • Any other information that is important to this PR such as screenshots of how the component looks before and after the change.

Pay close attention to (OPTIONAL)

  • Any specific code change or test case points which must be addressed/reviewed at the time of GA release.

Screenshots (if relevant)


Thanks for contributing!

@splunk-soar-connectors-bot
Copy link
Collaborator

Thank you for your submission! We have a total of 13 PRs open right now, and we are working hard on all of them! We will take a look as soon as we can.

@splunk-soar-connectors-bot
Copy link
Collaborator

@splunk-soar-connectors-bot
Copy link
Collaborator

@splunk-soar-connectors-bot
Copy link
Collaborator

@splunk-soar-connectors-bot
Copy link
Collaborator

@mmomin-crest mmomin-crest changed the base branch from next to PAPP-27155-improve-err-log September 5, 2022 07:47
@mmomin-crest mmomin-crest merged commit 7abc161 into splunk-soar-connectors:PAPP-27155-improve-err-log Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants