Interface RequestErrorHandler
- All Known Implementing Classes:
RequestErrorHandlerImpl
public interface RequestErrorHandler
Used to wrap exceptions originating from REST calls through the charon framework.
-
Method Summary
Modifier and TypeMethodDescriptionvoidprocessConfigurationRuntimeException(RuntimeException e, String configId) Processes runtime exceptions like timeout or non-existing server.processCreateDefaultConfigurationError(com.hybris.charon.exp.HttpException ex) processes exception from configuration create default configuration requestprocessCreatePricingDocumentError(com.hybris.charon.exp.HttpException ex) processes exception from create pricing document requestProcesses runtime exceptions like timeout or non-existing server.processCreateRuntimeConfigurationFromExternalError(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 requestprocessGetConfigurationError(com.hybris.charon.exp.HttpException ex, String configId) processes exception from configuration create default configuration requestprocessGetExternalConfigurationError(com.hybris.charon.exp.HttpException ex, String configId) processes exception from get external configuration requestprocessGetItemWithGroupDetailsError(com.hybris.charon.exp.HttpException ex, String configId, String itemId, List<String> groupList) processes exception from get item with group details requestbooleanprocessHasKbError(com.hybris.charon.exp.HttpException ex) processes exception from get knowledgebase requestvoidprocessUpdateConfigurationError(com.hybris.charon.exp.HttpException ex, String configId) processes exception from configuration update request
-
Method Details
-
processUpdateConfigurationError
void processUpdateConfigurationError(com.hybris.charon.exp.HttpException ex, String configId) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException processes exception from configuration update request- Parameters:
ex- exception to processconfigId- configuration runtime id of the configuration that was attempted to be updated- Throws:
de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
-
processCreateDefaultConfigurationError
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, String configId) throws de.hybris.platform.sap.productconfig.runtime.interf.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:
de.hybris.platform.sap.productconfig.runtime.interf.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, String configId) throws de.hybris.platform.sap.productconfig.runtime.interf.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:
de.hybris.platform.sap.productconfig.runtime.interf.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 de.hybris.platform.sap.productconfig.runtime.interf.PricingEngineException processes exception from create pricing document request- Parameters:
ex- exception to process- Returns:
- pricing document result
- Throws:
de.hybris.platform.sap.productconfig.runtime.interf.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(RuntimeException ex) throws de.hybris.platform.sap.productconfig.runtime.interf.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:
de.hybris.platform.sap.productconfig.runtime.interf.PricingEngineException
-
processConfigurationRuntimeException
void processConfigurationRuntimeException(RuntimeException e, String configId) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException Processes 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:
de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
-
processGetItemWithGroupDetailsError
CPSItem processGetItemWithGroupDetailsError(com.hybris.charon.exp.HttpException ex, String configId, String itemId, List<String> groupList) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException processes exception from get item with group details request- Parameters:
ex- exception to processconfigId- configuration runtime id of the configuration that was attempted to be retrieveditemId- item runtime id of the configuration that was attempted to be retrievedgroupList- list of group names of the configuration that was attempted to be retrieved- Returns:
- configuration update result
- Throws:
de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
-