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 NoErrorResponseTransformStrategy
INSTANCE
-
Constructor Summary
Constructors Constructor Description NoErrorResponseTransformStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Function<String,String>
getErrorMessageTransformFunction()
Return a function for checking and transforming the error message if needed.int
hashCode()
Exception
transformIfNeeded(SanitizableException exception)
For a givenSanitizableException
apply 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:ErrorResponseTransformStrategy
For a givenSanitizableException
apply the transformation strategy and return the sanitized Exception if the transformation stategy was applied.- Specified by:
transformIfNeeded
in interfaceErrorResponseTransformStrategy
-
getErrorMessageTransformFunction
public Function<String,String> getErrorMessageTransformFunction()
Description copied from interface:ErrorResponseTransformStrategy
Return 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:
getErrorMessageTransformFunction
in interfaceErrorResponseTransformStrategy
-
-