Customize error handler

You can provide your own custom error handler logic to standardize across your production environment.

This error handler is called when an unknown feature key is referenced.

See the code example below. If the error handler is not overridden, a no-op error handler is used by default.

import com.optimizely.ab.error.ErrorHandler;

// Default handler that raises exceptions
ErrorHandler errorHandler = new RaiseExceptionErrorHandler();

// Build a manager
optimizelyManager = OptimizelyManager.builder()
  .withEventDispatchInterval(60L * 10L)
  .withDatafileDownloadInterval(60L * 10L)

Did this page help you?