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

API Error Message Incorrect Parsing #8

Open
bneises opened this issue Oct 23, 2023 · 0 comments
Open

API Error Message Incorrect Parsing #8

bneises opened this issue Oct 23, 2023 · 0 comments

Comments

@bneises
Copy link
Contributor

bneises commented Oct 23, 2023

Name of the app
Proofpoint TAP

Describe the bug
If an error occurs on the API call, the service returns text instead of JSON.

To Reproduce
Steps to reproduce the behavior:

  1. Run action "get campaign" with an incorrect campaign ID.
  2. The app returns the following error:

Unable to parse JSON response. Error: Error Message: Expecting value: line 1 column 1 (char 0)

Expected behavior
Return the text returned by the API as is instead of trying to parse it as JSON.

Screenshots
N/A

Splunk SOAR Version (please complete the following information):

  • Splunk SOAR Cloud, version 6.1.1.211
  • App Version: 2.0.0
bneises added a commit to bneises/proofpoint that referenced this issue Oct 23, 2023
mishalp-crest added a commit that referenced this issue Nov 9, 2023
* #7 Remove self parameter from method calls

* #8 Added API error handling

* Add name to contributors

* Update release notes.

* Update min_phantom_version.

* standard dev check changes

* make message consistent

* variable name consistency

* linting changes

* msg -> message changes

* minor changes

* removed python 2 to3 changes

* minor changes

* update release notes

* removed unused variables

* remove unused constant

* updated license

* minor code fix

---------

Co-authored-by: mishalp-crest <[email protected]>
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

No branches or pull requests

1 participant