When something goes wrong I want to degrade the user experience (instead of returning a 500 - Server Error) And I want to be notified about the failure
Wrap non mission critical code:
Failsafe.failsafe do
UnreliableApi.send_event "Signup"
end
Wrap complex partials:
<%- Failsafe.failsafe do %>
<%= render "notifications" %>
<% end %>
Prevent side effects:
Failsafe.failsafe { log_event }
Failsafe.failsafe { notify_recipient }
Failsafe.failsafe { send_event_to_optimizely }
Failsafe.failsafe { send_event_to_kinesis }