diff --git a/pontos/nvd/cpe/__init__.py b/pontos/nvd/cpe/__init__.py index 6a3167a9a..a1a18b471 100644 --- a/pontos/nvd/cpe/__init__.py +++ b/pontos/nvd/cpe/__init__.py @@ -19,6 +19,8 @@ from argparse import ArgumentParser, Namespace from typing import Callable +import httpx + from pontos.nvd.cpe.api import CPEApi __all__ = ("CPEApi",) @@ -77,3 +79,5 @@ def main(parser: ArgumentParser, func: Callable) -> None: asyncio.run(func(args)) except KeyboardInterrupt: pass + except httpx.HTTPStatusError as e: + print(f"HTTP Error {e.response.status_code}: {e.response.text}") diff --git a/pontos/nvd/cve/__init__.py b/pontos/nvd/cve/__init__.py index c876fe128..234badb09 100644 --- a/pontos/nvd/cve/__init__.py +++ b/pontos/nvd/cve/__init__.py @@ -19,6 +19,8 @@ from argparse import ArgumentParser, Namespace from typing import Callable +import httpx + from pontos.nvd.cve.api import CVEApi __all__ = ("CVEApi",) @@ -88,3 +90,5 @@ def main(parser: ArgumentParser, func: Callable) -> None: asyncio.run(func(args)) except KeyboardInterrupt: pass + except httpx.HTTPStatusError as e: + print(f"HTTP Error {e.response.status_code}: {e.response.text}")