nvd_client.exceptions¶
Errors raised by the NVD client.
Classes:
-
NvdClientError–Base class for every error raised by this package.
-
InvalidDateFormatError–A date argument was not a
datetime. -
InvalidParametersError–Query parameters are missing, incomplete, or outside NVD's limits.
-
InvalidCVEIDError–A CVE ID is not in
CVE-YYYY-NNNNform (at least four digits). -
NvdApiError–The NVD service rejected a request or the connection failed.
-
NvdRateLimitError–NVD returned 403 or 429 after retries were exhausted.
-
NvdNotFoundError–The requested CVE or resource was not found.
-
NvdResponseError–The HTTP call succeeded but the body was not the expected NVD document.
InvalidDateFormatError
¶
InvalidDateFormatError(date_str: object, message: str = 'Dates must be datetime objects. Naive datetimes are treated as UTC.')
InvalidParametersError
¶
InvalidParametersError(missing_params: list[str] | None = None, message: str = 'Invalid parameter combination. Both parameters are required.')
Bases: NvdClientError
Query parameters are missing, incomplete, or outside NVD's limits.
Attributes:
InvalidCVEIDError
¶
InvalidCVEIDError(cve_id: str, message: str = 'Invalid CVE ID format. Use CVE-YYYY-NNNN (at least four digits).')
NvdApiError
¶
Bases: NvdClientError
The NVD service rejected a request or the connection failed.
Attributes:
-
status_code– -
url–
NvdRateLimitError
¶
Bases: NvdApiError
NVD returned 403 or 429 after retries were exhausted.
NVD uses both status codes when a client exceeds the rolling rate limit (5 requests per 30 seconds without an API key, 50 with one).
Attributes:
-
status_code– -
url–
NvdNotFoundError
¶
NvdResponseError
¶
Bases: NvdClientError
The HTTP call succeeded but the body was not the expected NVD document.