diff --git a/CHANGES b/CHANGES index f6b5847..5fcef2d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1.16.1 +----- +- Show the server's error reason and missing scan file details when an offline endpoint scan upload fails + 1.16.0 ----- - alerts-data-sources deactivate-batch: deactivate multiple alert data sources concurrently, either from a text file of connector IDs (`--config`) or every connector currently in `active`/`offline`/`update_failed` (`--all-active`) diff --git a/intezer_analyze_cli/__init__.py b/intezer_analyze_cli/__init__.py index 20f9c7e..4b2887f 100644 --- a/intezer_analyze_cli/__init__.py +++ b/intezer_analyze_cli/__init__.py @@ -1 +1 @@ -__version__ = '1.16.0' +__version__ = '1.16.1' diff --git a/intezer_analyze_cli/commands.py b/intezer_analyze_cli/commands.py index af5817c..7de1d07 100644 --- a/intezer_analyze_cli/commands.py +++ b/intezer_analyze_cli/commands.py @@ -5,6 +5,7 @@ from email.utils import parsedate_to_datetime import click +import requests from intezer_sdk import api from intezer_sdk import consts as sdk_consts from intezer_sdk import errors as sdk_errors @@ -310,6 +311,15 @@ def upload_offline_endpoint_scan(offline_scan_directory: str, force: bool = Fals click.echo(f'Analyze error: {e}') logger.exception('Failed to analyze offline scan') raise + except requests.HTTPError as error: + click.echo(f'Upload failed: {error}') + logger.exception('Failed to upload offline scan') + raise + except FileNotFoundError as error: + click.echo(f'Missing scan file: {error.filename}. Make sure the path is the scan output directory ' + 'created by the scanner (scan___