Documentation

Failsafe Adapter

Wraps another adapter and fails safely when an exception is raised. This prevents issues like network hiccups from taking down an application using Flipper.

Installation

This adapter is included with the flipper gem.

Usage

Flipper.configure do |config|
  config.use Flipper::Adapters::Failsafe,
    errors: [Redis::ConnectionError, Redis::TimeoutError]
  config.adapter do
    Flipper::Adapters::Redis.new(Redis.new)
  end
end

The errors option defaults to [StandardError], which will rescue any exception raised. It is recommended to set it to specific errors that you anticipate could take down your application.

Warning: This adapter will silently swallow the errors that it encounters, including those encountered while updating features (like Flipper.enable :my_feature). You will likely want some other health check in place to notify you of issues.

Ready to try it out?

Get audit history, rollbacks, advanced permissions, analytics, and all of your projects in one place.


Prefer our Cloudless option?

You can choose from several tiers to sponsor Flipper on GitHub and get some great benefits!

The Friday Deploy

Get updates for all things Flipper—open source and cloud.

Have questions? Need help?

Email us any time or head on over to our documentation or status page for the latest on the app or API.

Ready to take Flipper for a swim?

No credit card required. 14-day free trial. And customer support directly from the developers.