Interface RequestErrorHandler
-
- All Known Implementing Classes:
RequestErrorHandlerImpl
public interface RequestErrorHandlerUsed to wrap exceptions originating from REST calls through the charon framework.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidprocessConfigurationRuntimeException(java.lang.RuntimeException e, java.lang.String configId)Processes runtime exceptions like timeout or non-existing server.CPSConfigurationprocessCreateDefaultConfigurationError(com.hybris.charon.exp.HttpException ex)processes exception from configuration create default configuration requestPricingDocumentResultprocessCreatePricingDocumentError(com.hybris.charon.exp.HttpException ex)processes exception from create pricing document requestPricingDocumentResultprocessCreatePricingDocumentRuntimeException(java.lang.RuntimeException ex)Processes runtime exceptions like timeout or non-existing server.CPSConfigurationprocessCreateRuntimeConfigurationFromExternalError(com.hybris.charon.exp.HttpException ex)processes exception from create configuration from external requestvoidprocessDeleteConfigurationError(com.hybris.charon.exp.HttpException ex)processes exception from delete configuration requestCPSConfigurationprocessGetConfigurationError(com.hybris.charon.exp.HttpException ex, java.lang.String configId)processes exception from configuration create default configuration requestCPSExternalConfigurationprocessGetExternalConfigurationError(com.hybris.charon.exp.HttpException ex, java.lang.String configId)processes exception from get external configuration requestbooleanprocessHasKbError(com.hybris.charon.exp.HttpException ex)processes exception from get knowledgebase requestvoidprocessUpdateConfigurationError(com.hybris.charon.exp.HttpException ex, java.lang.String configId)processes exception from configuration update request
-
-
-
Method Detail
-
processUpdateConfigurationError
void processUpdateConfigurationError(com.hybris.charon.exp.HttpException ex, java.lang.String configId) throws ConfigurationEngineExceptionprocesses exception from configuration update request- Parameters:
ex- exception to processconfigId- configuration runtime id of the configuration that was attempted to be updated- Throws:
ConfigurationEngineException
-
processCreateDefaultConfigurationError
CPSConfiguration processCreateDefaultConfigurationError(com.hybris.charon.exp.HttpException ex)
processes exception from configuration create default configuration request- Parameters:
ex- exception to process- Returns:
- default configuration
-
processGetConfigurationError
CPSConfiguration processGetConfigurationError(com.hybris.charon.exp.HttpException ex, java.lang.String configId) throws ConfigurationEngineException
processes exception from configuration create default configuration request- Parameters:
ex- exception to processconfigId- configuration runtime id of the configuration that was attempted to be retrieved- Returns:
- configuration update result
- Throws:
ConfigurationEngineException
-
processDeleteConfigurationError
void processDeleteConfigurationError(com.hybris.charon.exp.HttpException ex)
processes exception from delete configuration request- Parameters:
ex- exception to process
-
processGetExternalConfigurationError
CPSExternalConfiguration processGetExternalConfigurationError(com.hybris.charon.exp.HttpException ex, java.lang.String configId) throws ConfigurationEngineException
processes exception from get external configuration request- Parameters:
ex- exception to processconfigId- configuration runtime id of the external configuration that was attempted to be retrieved- Returns:
- external representation of configuration
- Throws:
ConfigurationEngineException- Exception on calling the configuration service (e.g. when the session has expired)
-
processCreateRuntimeConfigurationFromExternalError
CPSConfiguration processCreateRuntimeConfigurationFromExternalError(com.hybris.charon.exp.HttpException ex)
processes exception from create configuration from external request- Parameters:
ex- exception to process- Returns:
- runtime configuration
-
processCreatePricingDocumentError
PricingDocumentResult processCreatePricingDocumentError(com.hybris.charon.exp.HttpException ex) throws PricingEngineException
processes exception from create pricing document request- Parameters:
ex- exception to process- Returns:
- pricing document result
- Throws:
PricingEngineException- which indicates the error towards higher layers
-
processHasKbError
boolean processHasKbError(com.hybris.charon.exp.HttpException ex)
processes exception from get knowledgebase request- Parameters:
ex- exception to process- Returns:
- whether kb exists
-
processCreatePricingDocumentRuntimeException
PricingDocumentResult processCreatePricingDocumentRuntimeException(java.lang.RuntimeException ex) throws PricingEngineException
Processes runtime exceptions like timeout or non-existing server. Default behavior: Timeout exceptions are handled gracefully in the sense that they are converted intoPricingEngineExceptionwhile other runtime exceptions are re-thrown.- Parameters:
ex- Runtime exception that wraps the actual root cause- Returns:
- Dummy result of the pricing call
- Throws:
PricingEngineException
-
processConfigurationRuntimeException
void processConfigurationRuntimeException(java.lang.RuntimeException e, java.lang.String configId) throws ConfigurationEngineExceptionProcesses runtime exceptions like timeout or non-existing server. Default behavior: Timeout exceptions are handled gracefully in the sense that they are converted intoConfigurationEngineExceptionwhile other runtime exceptions are re-thrown.- Parameters:
e- Runtime exception that wraps the actual root causeconfigId- configuration runtime id of the configuration that was requested- Throws:
ConfigurationEngineException
-
-