class Zerobounce::Middleware::RaiseError
Raises an error if the response wasn't successful.
@author Aaron Frase
Public Instance Methods
on_complete(env)
click to toggle source
Check for errors after the response has finished.
@param [Hash] env @raise [Error]
# File lib/zerobounce/middleware/raise_error.rb, line 16 def on_complete(env) if (error = Zerobounce::Error.from_response(env)) # rubocop:disable Style/GuardClause raise error end end