Skip to content

Commit

Permalink
qradar return error with traceback (#27229)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilaner authored and ostolero committed Jun 14, 2023
1 parent b8ed51d commit 63cdfac
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Packs/QRadar/Integrations/QRadar_v3/QRadar_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ def update_user_query(user_query: str) -> str:


def insert_to_updated_context(context_data: dict,
offense_ids: list = None,
offense_ids: list | None = None,
should_update_last_fetch: bool = False,
should_update_last_mirror: bool = False,
should_add_reset_key: bool = False,
Expand Down Expand Up @@ -849,7 +849,7 @@ def insert_to_updated_context(context_data: dict,
def safely_update_context_data(
context_data: dict,
version: Any,
offense_ids: list = None,
offense_ids: list | None = None,
should_update_last_fetch: bool = False,
should_update_last_mirror: bool = False,
should_add_reset_key: bool = False,
Expand Down Expand Up @@ -3591,7 +3591,7 @@ def create_events_search(client: Client,
events_columns: str,
events_limit: int,
offense_id: int,
offense_start_time: str = None,
offense_start_time: str | None = None,
return_raw_response: bool = False,
) -> str:
additional_where = ''
Expand Down Expand Up @@ -4229,9 +4229,9 @@ def main() -> None: # pragma: no cover
raise NotImplementedError(f'''Command '{command}' is not implemented.''')

# Log exceptions and return errors
except Exception as e:
except Exception:
print_debug_msg(f"The integration context_data is {get_integration_context()}")
return_error(f'Failed to execute {demisto.command()} command.\nError:\n{str(e)}')
return_error(f'Failed to execute {demisto.command()} command.\nError:\n{traceback.format_exc()}')


''' ENTRY POINT '''
Expand Down
2 changes: 1 addition & 1 deletion Packs/QRadar/Integrations/QRadar_v3/QRadar_v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2926,7 +2926,7 @@ script:
script: '-'
type: python
subtype: python3
dockerimage: demisto/python3:3.10.11.61265
dockerimage: demisto/python3:3.10.12.62631
feed: false
isfetch: false
isremotesyncin: true
Expand Down
7 changes: 7 additions & 0 deletions Packs/QRadar/ReleaseNotes/2_4_23.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

#### Integrations

##### IBM QRadar v3

- Fixed an issue where the full traceback was not displayed when encountered errors.
- Updated the Docker image to: *demisto/python3:3.10.12.62631*.
2 changes: 1 addition & 1 deletion Packs/QRadar/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "IBM QRadar",
"description": "Fetch offenses as incidents and search QRadar",
"support": "xsoar",
"currentVersion": "2.4.22",
"currentVersion": "2.4.23",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit 63cdfac

Please sign in to comment.