Interface RequestErrorHandler

All Known Implementing Classes:
RequestErrorHandlerImpl

public interface RequestErrorHandler
Used to wrap exceptions originating from REST calls through the charon framework.
  • 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 process
      configId - configuration runtime id of the configuration that was attempted to be updated
      Throws:
      de.hybris.platform.sap.productconfig.runtime.interf.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, String configId) throws de.hybris.platform.sap.productconfig.runtime.interf.ConfigurationEngineException
      processes exception from configuration create default configuration request
      Parameters:
      ex - exception to process
      configId - 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 process
      configId - 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 into PricingEngineException while 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 into ConfigurationEngineException while other runtime exceptions are re-thrown.
      Parameters:
      e - Runtime exception that wraps the actual root cause
      configId - 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 process
      configId - configuration runtime id of the configuration that was attempted to be retrieved
      itemId - item runtime id of the configuration that was attempted to be retrieved
      groupList - 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