Class IcebergExceptionMapper
java.lang.Object
org.apache.polaris.service.exception.IcebergExceptionMapper
- All Implemented Interfaces:
jakarta.ws.rs.ext.ExceptionMapper<RuntimeException>
@Provider
public class IcebergExceptionMapper
extends Object
implements jakarta.ws.rs.ext.ExceptionMapper<RuntimeException>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSignifies that we could not extract an HTTP code from a given cloud exception -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsAnyAccessDeniedHint(String message) static intWe typically call cloud providers over HTTP, so when there's an exception there's typically an associated HTTP code.static Collection<String> static booleanCheck if the Throwable is retryable for the storage providerjakarta.ws.rs.core.ResponsetoResponse(RuntimeException runtimeException)
-
Field Details
-
UNKNOWN_CLOUD_HTTP_CODE
public static final int UNKNOWN_CLOUD_HTTP_CODESignifies that we could not extract an HTTP code from a given cloud exception- See Also:
-
RETRYABLE_AZURE_HTTP_CODES
-
-
Constructor Details
-
IcebergExceptionMapper
public IcebergExceptionMapper()
-
-
Method Details
-
toResponse
- Specified by:
toResponsein interfacejakarta.ws.rs.ext.ExceptionMapper<RuntimeException>
-
containsAnyAccessDeniedHint
-
isStorageProviderRetryableException
Check if the Throwable is retryable for the storage provider- Parameters:
t- the Throwable- Returns:
- true if the Throwable is retryable
-
getAccessDeniedHints
-
extractHttpCodeFromCloudException
We typically call cloud providers over HTTP, so when there's an exception there's typically an associated HTTP code. This extracts the HTTP code if possible.- Parameters:
t- The cloud provider throwable- Returns:
- UNKNOWN_CLOUD_HTTP_CODE if the throwable is not a cloud exception that we know how to extract the code from
-