You can provide your own customerror handler logic to standardize across your production environment.
This error handler is called when an unknown feature flag key is referenced.
See the code example below. If the error handler is not overridden, a no-op error handler is used by default.
require 'optimizely'# In a development environment, you might want the SDK to raise errors. In that case you can use out built-in RaiseErrorHandlererror_handler = Optimizely::RaiseErrorHandler.new# You can also define your own error handlerclass CustomErrorHandler < Optimizely::BaseErrorHandler def handle_error(error) # You can handle this error in any way you'd like puts error endenderror_handler = CustomErrorHandler.new# Pass the error handler into the Optimizely instanceoptimizely_client = Optimizely::Project.new( datafile: datafile, error_handler: error_handler)