gravitino.exceptions.handlers.error_handler.ErrorHandler

class gravitino.exceptions.handlers.error_handler.ErrorHandler

Bases: ABC

The ErrorHandler class is an abstract class specialized for handling ErrorResponse objects. Subclasses of ErrorHandler must implement the parseResponse method to provide custom parsing logic for different types of errors.

__init__()

Methods

__init__()

handle(error_response)

Handles the error response and raise the appropriate Exception.

abstract handle(error_response: ErrorResponse)

Handles the error response and raise the appropriate Exception. The implementation will use the provided error response to determine which exception to raise.

Args:

error_response: the error response from the server

Raises:

appropriate Exception.