Class NoErrorResponseTransformStrategy
- java.lang.Object
-
- org.apache.druid.common.exception.NoErrorResponseTransformStrategy
-
- All Implemented Interfaces:
ErrorResponseTransformStrategy
public class NoErrorResponseTransformStrategy extends Object implements ErrorResponseTransformStrategy
Error response transform strategy that does nothing and simply return the same Exception back without any change
-
-
Field Summary
Fields Modifier and Type Field Description static NoErrorResponseTransformStrategyINSTANCE
-
Constructor Summary
Constructors Constructor Description NoErrorResponseTransformStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Function<String,String>getErrorMessageTransformFunction()Return a function for checking and transforming the error message if needed.inthashCode()ExceptiontransformIfNeeded(SanitizableException exception)For a givenSanitizableExceptionapply the transformation strategy and return the sanitized Exception if the transformation stategy was applied.
-
-
-
Field Detail
-
INSTANCE
public static final NoErrorResponseTransformStrategy INSTANCE
-
-
Method Detail
-
transformIfNeeded
public Exception transformIfNeeded(SanitizableException exception)
Description copied from interface:ErrorResponseTransformStrategyFor a givenSanitizableExceptionapply the transformation strategy and return the sanitized Exception if the transformation stategy was applied.- Specified by:
transformIfNeededin interfaceErrorResponseTransformStrategy
-
getErrorMessageTransformFunction
public Function<String,String> getErrorMessageTransformFunction()
Description copied from interface:ErrorResponseTransformStrategyReturn a function for checking and transforming the error message if needed. Function can return null if error message needs to be omitted or return String to be use instead.- Specified by:
getErrorMessageTransformFunctionin interfaceErrorResponseTransformStrategy
-
-