Rapidata api client
RapidataApiClient #
Bases: ApiClient
Custom API client that wraps errors in RapidataError.
Source code in src/rapidata/rapidata_client/api/rapidata_api_client.py
response_deserialize #
response_deserialize(
response_data: RESTResponse,
response_types_map: Optional[
dict[str, ApiResponseT]
] = None,
) -> ApiResponse[ApiResponseT]
Override the response_deserialize method to catch and convert exceptions.
Source code in src/rapidata/rapidata_client/api/rapidata_api_client.py
mark_sdk_outdated #
Record that the installed SDK is behind the latest release.
Source code in src/rapidata/rapidata_client/api/rapidata_api_client.py
format_outdated_sdk_note #
Build the human-readable outdated-SDK note, or None if not outdated.
Used by RapidataError and LazyValidatedModel to append the same hint to their error messages when the installed SDK is behind the latest release.
Source code in src/rapidata/rapidata_client/api/rapidata_api_client.py
suppress_rapidata_error_logging #
Context manager to suppress error logging for RapidataApiClient calls.
Source code in src/rapidata/rapidata_client/api/rapidata_api_client.py
optional_api_call #
Mark a block as non-critical / best-effort.
Inside the block
- RapidataApiClient errors are logged at DEBUG instead of ERROR (via suppress_rapidata_error_logging).
- Any exception that escapes the block is caught and logged at DEBUG as well. The caller never sees it.
Use for best-effort calls like version checks, telemetry, or feature-flag lookups where failure must not impact the user.