From f65431f788c54a995cf15641d7c2cd7f034da2e5 Mon Sep 17 00:00:00 2001 From: Gonzalo Rodriguez Date: Fri, 11 Oct 2019 18:02:04 -0300 Subject: [PATCH] feat: provide possibility of rescuing any Rack::Attack error --- lib/rack/attack.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rack/attack.rb b/lib/rack/attack.rb index c8d4ad1..b33092d 100644 --- a/lib/rack/attack.rb +++ b/lib/rack/attack.rb @@ -10,8 +10,9 @@ require 'rack/attack/railtie' if defined?(::Rails) module Rack class Attack - class MisconfiguredStoreError < StandardError; end - class MissingStoreError < StandardError; end + class Error < StandardError; end + class MisconfiguredStoreError < Error; end + class MissingStoreError < Error; end autoload :Cache, 'rack/attack/cache' autoload :Check, 'rack/attack/check'