Class ErrorHandlers

java.lang.Object
org.apache.gravitino.client.ErrorHandlers

public class ErrorHandlers extends Object
Utility class providing error handling for REST requests and specific to Metalake errors.

It also includes utility methods to format error messages and convert stack traces to strings.

  • Method Details

    • metalakeErrorHandler

      public static Consumer<ErrorResponse> metalakeErrorHandler()
      Creates an error handler specific to Metalake operations.
      Returns:
      A Consumer representing the Metalake error handler.
    • catalogErrorHandler

      public static Consumer<ErrorResponse> catalogErrorHandler()
      Creates an error handler specific to Catalog operations.
      Returns:
      A Consumer representing the Catalog error handler.
    • schemaErrorHandler

      public static Consumer<ErrorResponse> schemaErrorHandler()
      Creates an error handler specific to Schema operations.
      Returns:
      A Consumer representing the Schema error handler.
    • tableErrorHandler

      public static Consumer<ErrorResponse> tableErrorHandler()
      Creates an error handler specific to Table operations.
      Returns:
      A Consumer representing the Table error handler.
    • partitionErrorHandler

      public static Consumer<ErrorResponse> partitionErrorHandler()
      Creates an error handler specific to Partition operations.
      Returns:
      A Consumer representing the Partition error handler.
    • restErrorHandler

      public static Consumer<ErrorResponse> restErrorHandler()
      Creates a generic error handler for REST requests.
      Returns:
      A Consumer representing the generic REST error handler.
    • oauthErrorHandler

      public static Consumer<ErrorResponse> oauthErrorHandler()
      Creates an error handler specific to OAuth2 requests.
      Returns:
      A Consumer representing the OAuth2 error handler.
    • filesetErrorHandler

      public static Consumer<ErrorResponse> filesetErrorHandler()
      Creates an error handler specific to Fileset operations.
      Returns:
      A Consumer representing the Fileset error handler.
    • topicErrorHandler

      public static Consumer<ErrorResponse> topicErrorHandler()
      Creates an error handler specific to Topic operations.
      Returns:
      A Consumer representing the Topic error handler.
    • userErrorHandler

      public static Consumer<ErrorResponse> userErrorHandler()
      Creates an error handler specific to User operations.
      Returns:
      A Consumer representing the User error handler.
    • groupErrorHandler

      public static Consumer<ErrorResponse> groupErrorHandler()
      Creates an error handler specific to Group operations.
      Returns:
      A Consumer representing the Group error handler.
    • roleErrorHandler

      public static Consumer<ErrorResponse> roleErrorHandler()
      Creates an error handler specific to Role operations.
      Returns:
      A Consumer representing the Role error handler.
    • permissionOperationErrorHandler

      public static Consumer<ErrorResponse> permissionOperationErrorHandler()
      Creates an error handler specific to permission operations.
      Returns:
      A Consumer representing the permission error handler.
    • tagErrorHandler

      public static Consumer<ErrorResponse> tagErrorHandler()
      Creates an error handler specific to Tag operations.
      Returns:
      A Consumer representing the Tag error handler.
    • policyErrorHandler

      public static Consumer<ErrorResponse> policyErrorHandler()
      Creates an error handler specific to policy operations.
      Returns:
      A Consumer representing the policy error handler.
    • credentialErrorHandler

      public static Consumer<ErrorResponse> credentialErrorHandler()
      Creates an error handler specific to credential operations.
      Returns:
      A Consumer representing the credential error handler.
    • ownerErrorHandler

      public static Consumer<ErrorResponse> ownerErrorHandler()
      Creates an error handler specific to Owner operations.
      Returns:
      A Consumer representing the Owner error handler.
    • modelErrorHandler

      public static Consumer<ErrorResponse> modelErrorHandler()
      Creates an error handler specific to Model operations.
      Returns:
      A Consumer representing the Model error handler.
    • jobErrorHandler

      public static Consumer<ErrorResponse> jobErrorHandler()
      Creates an error handler specific to job and job template operations.
      Returns:
      A Consumer representing the job error handler.
    • statisticsErrorHandler

      public static Consumer<ErrorResponse> statisticsErrorHandler()
      Creates an error handler specific to Statistics operations.
      Returns:
      A Consumer representing the Statistics error handler.