Handle REST API response parsing errors with rich context.
handle_rest_api_response_error(
error: Exception,
operation: str,
endpoint: Optional[str] = None,
status_code: Optional[int] = None,
response_content: Optional[str] = None,
logger_instance: Optional[logging.Logger] = None
) -> str| Name | Type | Description |
|---|---|---|
error* | Exception | The exception that occurred |
operation* | str | Description of the operation |
endpoint | Optional[str] | Default: NoneAPI endpoint if available |
status_code | Optional[int] | Default: NoneHTTP status code if available |
response_content | Optional[str] | Default: NoneResponse content preview if available |
logger_instance | Optional[logging.Logger] | Default: NoneSpecific logger to use |