HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In


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.

Here is a code example where an error handler from the SDK is used. If the error handler is not overridden, a no-op error handler is used by default.





For additional control and visibility into the errors coming from the Optimizely SDK, we recommend implementing your own custom error handler. With a custom error handler, you can choose what to do with an error, whether it may be as simple as logging the error to console or sending the error to another error monitoring service. Below is an example of using a custom error handler to log errors: